Commit 908d4049 authored by David Flynn's avatar David Flynn Committed by Derk-Jan Hartman

[codec/schroedinger] If pts is unavaliable, do not fall back to dts

It is more reliable to interpolate pts at the output of the decoder
than to use dts.

This requires demuxers that only provide dts (such as avi) to provide
an initial value of pts so that the decoder may interpolate correctly.
parent e4956921
...@@ -206,16 +206,14 @@ static void StorePicturePTS( decoder_t *p_dec, block_t *p_block, int i_pupos ) ...@@ -206,16 +206,14 @@ static void StorePicturePTS( decoder_t *p_dec, block_t *p_block, int i_pupos )
{ {
decoder_sys_t *p_sys = p_dec->p_sys; decoder_sys_t *p_sys = p_dec->p_sys;
uint32_t u_pnum; uint32_t u_pnum;
mtime_t i_pts;
u_pnum = GetDWBE( p_block->p_buffer + i_pupos + 13 ); u_pnum = GetDWBE( p_block->p_buffer + i_pupos + 13 );
i_pts = p_block->i_pts > 0 ? p_block->i_pts : p_block->i_dts;
for( int i=0; i<PTS_TLB_SIZE; i++ ) { for( int i=0; i<PTS_TLB_SIZE; i++ ) {
if( p_sys->pts_tlb[i].i_empty ) { if( p_sys->pts_tlb[i].i_empty ) {
p_sys->pts_tlb[i].u_pnum = u_pnum; p_sys->pts_tlb[i].u_pnum = u_pnum;
p_sys->pts_tlb[i].i_pts = i_pts; p_sys->pts_tlb[i].i_pts = p_block->i_pts;
p_sys->pts_tlb[i].i_empty = 0; p_sys->pts_tlb[i].i_empty = 0;
return; return;
...@@ -223,7 +221,7 @@ static void StorePicturePTS( decoder_t *p_dec, block_t *p_block, int i_pupos ) ...@@ -223,7 +221,7 @@ static void StorePicturePTS( decoder_t *p_dec, block_t *p_block, int i_pupos )
} }
msg_Err( p_dec, "Could not store PTS %"PRId64" for picture %u", msg_Err( p_dec, "Could not store PTS %"PRId64" for picture %u",
i_pts, u_pnum ); p_block->i_pts, u_pnum );
} }
/***************************************************************************** /*****************************************************************************
......
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