Commit 0c56024b authored by Ilkka Ollakka's avatar Ilkka Ollakka

x264.c: remote pts/dts scaling as it isn't needed nowadays

parent b7003c73
...@@ -1331,12 +1331,6 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict ) ...@@ -1331,12 +1331,6 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
#endif #endif
if( likely(p_pict) ) { if( likely(p_pict) ) {
pic.i_pts = p_pict->date; pic.i_pts = p_pict->date;
/* scale pts starting from 0 as libx264 seems to return dts values
assume that
*/
if( unlikely( p_sys->i_initial_delay == 0 ) )
p_sys->i_initial_delay = p_pict->date;
pic.i_pts -= p_sys->i_initial_delay;
pic.img.i_csp = p_sys->i_colorspace; pic.img.i_csp = p_sys->i_colorspace;
pic.img.i_plane = p_pict->i_planes; pic.img.i_plane = p_pict->i_planes;
for( i = 0; i < p_pict->i_planes; i++ ) for( i = 0; i < p_pict->i_planes; i++ )
...@@ -1390,8 +1384,8 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict ) ...@@ -1390,8 +1384,8 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
p_enc->fmt_in.video.i_frame_rate; p_enc->fmt_in.video.i_frame_rate;
/* scale pts-values back*/ /* scale pts-values back*/
p_block->i_pts = pic.i_pts + p_sys->i_initial_delay; p_block->i_pts = pic.i_pts;
p_block->i_dts = pic.i_dts + p_sys->i_initial_delay; p_block->i_dts = pic.i_dts;
return p_block; return p_block;
} }
......
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