[vlc-devel] commit: [codec/schroedinger] If pts is unavaliable, do not fall back to dts (David Flynn )

git version control git at videolan.org
Sun Aug 24 16:43:34 CEST 2008


vlc | branch: master | David Flynn <davidf at woaf.net> | Sat Aug 23 22:08:09 2008 +0100| [908d40495f2861c0a0c65b80703599c1981f7c3e] | committer: 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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=908d40495f2861c0a0c65b80703599c1981f7c3e
---

 modules/codec/schroedinger.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c
index 3fc1582..b89e7df 100644
--- a/modules/codec/schroedinger.c
+++ b/modules/codec/schroedinger.c
@@ -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;
     uint32_t u_pnum;
-    mtime_t i_pts;
 
     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++ ) {
         if( p_sys->pts_tlb[i].i_empty ) {
 
             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;
 
             return;
@@ -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",
-             i_pts, u_pnum );
+             p_block->i_pts, u_pnum );
 }
 
 /*****************************************************************************




More information about the vlc-devel mailing list