diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-25 21:22:55 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-25 21:22:55 +0000 |
commit | 9b195435b3f98480e300f7c00a20e52c9bbce65f (patch) | |
tree | 2cd069901ede636662e5b6bf06b74674027a2a67 | |
parent | d38c340fdc970c913866f5e8461cf33ab200a51b (diff) | |
download | ffmpeg-9b195435b3f98480e300f7c00a20e52c9bbce65f.tar.gz |
Fix timestamp scaling in the overlay filter.
Compute the outpicref PTS in start_frame(), since it is required for
comparing that value with the value of the overpicref.
Originally committed as revision 25828 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavfilter/vf_overlay.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index 1c04ecd34e..a170e817a2 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -212,6 +212,8 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) OverlayContext *over = ctx->priv; inlink->dst->outputs[0]->out_buf = outpicref; + outpicref->pts = av_rescale_q(outpicref->pts, ctx->inputs[MAIN]->time_base, + ctx->outputs[0]->time_base); if (!over->overpicref || over->overpicref->pts < outpicref->pts) { AVFilterBufferRef *old = over->overpicref; @@ -322,9 +324,6 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) AVFilterBufferRef *outpicref = outlink->out_buf; OverlayContext *over = ctx->priv; - outpicref->pts = av_rescale_q(outpicref->pts, ctx->inputs[MAIN]->time_base, - outlink->time_base); - if (over->overpicref && !(over->x >= outpicref->video->w || over->y >= outpicref->video->h || y+h < over->y || y >= over->y + over->overpicref->video->h)) { |