]> git.sesse.net Git - vlc/commitdiff
transcode: set output pts in OutputFrame
authorIlkka Ollakka <ileoo@videolan.org>
Fri, 31 Jan 2014 10:50:50 +0000 (12:50 +0200)
committerIlkka Ollakka <ileoo@videolan.org>
Fri, 31 Jan 2014 10:55:02 +0000 (12:55 +0200)
Fixes setting output pts if video filters return multiple
frames in loop but in OutputFrame we don't need to duplicate. Then
we don't set output_pts correctly on following frames, only on first
one.

modules/stream_out/transcode/video.c

index bc6838d2691b9b1816fff154b7c3c903e7b6693c..12c974e5b85c1bf7d1e288eeb27adecc8796168c 100644 (file)
@@ -722,6 +722,9 @@ static void OutputFrame( sout_stream_sys_t *p_sys, picture_t *p_pic, sout_stream
             subpicture_Delete( p_subpic );
         }
     }
+
+    /* set output pts*/
+    p_pic->date = date_Get( &id->next_output_pts );
     /*This pts is handled, increase clock to next one*/
     date_Increment( &id->next_output_pts, id->p_encoder->fmt_in.video.i_frame_rate_base );
 
@@ -946,8 +949,6 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_t *id,
             msg_Dbg( p_stream, "not dropping frame");
 #endif
 
-            /* input calculated pts isn't necessary what pts output should be, so use output pts*/
-            p_pic->date = date_Get( &id->next_output_pts );
         }
 
         /* Run the filter and output chains; first with the picture,