Commit ba60bd80 authored by Ilkka Ollakka's avatar Ilkka Ollakka

transcode: update 'input pts' on loop so duplicate calculation can work properly with yadif2x etc

'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.
parent 4021ce94
...@@ -930,8 +930,6 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_t *id, ...@@ -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 */ /* Set the pts of the frame being encoded */
p_pic->date = i_pts; 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 /* 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, ...@@ -979,6 +977,9 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_t *id,
if( !p_user_filtered_pic ) if( !p_user_filtered_pic )
break; 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 ); OutputFrame( p_sys, p_user_filtered_pic, p_stream, id, out );
p_filtered_pic = NULL; p_filtered_pic = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment