]> git.sesse.net Git - vlc/commitdiff
transcode: update 'input pts' on loop so duplicate calculation can work properly...
authorIlkka Ollakka <ileoo@videolan.org>
Sat, 1 Feb 2014 13:06:33 +0000 (15:06 +0200)
committerIlkka Ollakka <ileoo@videolan.org>
Sun, 2 Feb 2014 14:02:02 +0000 (16:02 +0200)
'input pts' is the pts after all the filters, so for example yadif2x etc need to take into account.
It is used to determinate if we need to duplicate current block until we should get new picture
to encode.

modules/stream_out/transcode/video.c

index 0c811cae006732825ec8a55a75ee5f7250b5bf34..00a44f9ef8e5a8787978e022b96c38dac8aa64bc 100644 (file)
@@ -930,8 +930,6 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_t *id,
             /* Set the pts of the frame being encoded */
             p_pic->date = i_pts;
 
-            /* now take next input pts, pts dates are only enabled if p_module is set*/
-            date_Increment( &id->interpolated_pts, id->p_decoder->fmt_out.video.i_frame_rate_base );
 
 
             /* If input pts + input_frame_interval is lower than next_output_pts - output_frame_interval
@@ -979,6 +977,9 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_t *id,
                 if( !p_user_filtered_pic )
                     break;
 
+                /* now take next input pts, pts dates are only enabled if p_module is set*/
+                date_Increment( &id->interpolated_pts, id->p_decoder->fmt_out.video.i_frame_rate_base );
+
                 OutputFrame( p_sys, p_user_filtered_pic, p_stream, id, out );
 
                 p_filtered_pic = NULL;