[FFmpeg-cvslog] r25828 - trunk/libavfilter/vf_overlay.c

stefano subversion
Thu Nov 25 22:22:55 CET 2010


Author: stefano
Date: Thu Nov 25 22:22:55 2010
New Revision: 25828

Log:
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.

Modified:
   trunk/libavfilter/vf_overlay.c

Modified: trunk/libavfilter/vf_overlay.c
==============================================================================
--- trunk/libavfilter/vf_overlay.c	Thu Nov 25 21:50:28 2010	(r25827)
+++ trunk/libavfilter/vf_overlay.c	Thu Nov 25 22:22:55 2010	(r25828)
@@ -212,6 +212,8 @@ static void start_frame(AVFilterLink *in
     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 *inl
     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)) {



More information about the ffmpeg-cvslog mailing list