mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-10-05 18:01:59 +02:00
Fix timestamp handling in more filters after the change which set the
timebase in the filter link. Originally committed as revision 25649 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
a4ef9658a2
commit
41f1d3afeb
@ -99,7 +99,7 @@ static void end_frame(AVFilterLink *inlink)
|
|||||||
if (pblack >= blackframe->bamount)
|
if (pblack >= blackframe->bamount)
|
||||||
av_log(ctx, AV_LOG_INFO, "frame:%u pblack:%u pos:%"PRId64" pts:%"PRId64" t:%f\n",
|
av_log(ctx, AV_LOG_INFO, "frame:%u pblack:%u pos:%"PRId64" pts:%"PRId64" t:%f\n",
|
||||||
blackframe->frame, pblack, picref->pos, picref->pts,
|
blackframe->frame, pblack, picref->pos, picref->pts,
|
||||||
picref->pts == AV_NOPTS_VALUE ? -1 : (double)picref->pts / AV_TIME_BASE);
|
picref->pts == AV_NOPTS_VALUE ? -1 : picref->pts * av_q2d(inlink->time_base));
|
||||||
|
|
||||||
blackframe->frame++;
|
blackframe->frame++;
|
||||||
blackframe->nblack = 0;
|
blackframe->nblack = 0;
|
||||||
|
@ -184,7 +184,7 @@ static void end_frame(AVFilterLink *inlink)
|
|||||||
av_log(ctx, AV_LOG_INFO,
|
av_log(ctx, AV_LOG_INFO,
|
||||||
"x1:%d x2:%d y1:%d y2:%d w:%d h:%d x:%d y:%d pos:%"PRId64" pts:%"PRId64" t:%f crop=%d:%d:%d:%d\n",
|
"x1:%d x2:%d y1:%d y2:%d w:%d h:%d x:%d y:%d pos:%"PRId64" pts:%"PRId64" t:%f crop=%d:%d:%d:%d\n",
|
||||||
cd->x1, cd->x2, cd->y1, cd->y2, w, h, x, y, picref->pos, picref->pts,
|
cd->x1, cd->x2, cd->y1, cd->y2, w, h, x, y, picref->pos, picref->pts,
|
||||||
picref->pts == AV_NOPTS_VALUE ? -1 : (double)picref->pts / AV_TIME_BASE,
|
picref->pts == AV_NOPTS_VALUE ? -1 : picref->pts * av_q2d(inlink->time_base),
|
||||||
w, h, x, y);
|
w, h, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ static void end_frame(AVFilterLink *inlink)
|
|||||||
AVFilterBufferRef *inpicref = inlink->cur_buf;
|
AVFilterBufferRef *inpicref = inlink->cur_buf;
|
||||||
AVFilterBufferRef *outpicref = outlink->out_buf;
|
AVFilterBufferRef *outpicref = outlink->out_buf;
|
||||||
|
|
||||||
frei0r->update(frei0r->instance, (double)inpicref->pts / AV_TIME_BASE,
|
frei0r->update(frei0r->instance, inpicref->pts * av_q2d(inlink->time_base) * 1000,
|
||||||
(const uint32_t *)inpicref->data[0],
|
(const uint32_t *)inpicref->data[0],
|
||||||
(uint32_t *)outpicref->data[0]);
|
(uint32_t *)outpicref->data[0]);
|
||||||
avfilter_unref_buffer(inpicref);
|
avfilter_unref_buffer(inpicref);
|
||||||
|
Loading…
Reference in New Issue
Block a user