[vlc-devel] commit: Fixed initial timestamp value in TS demuxer. (Laurent Aimar )

git version control git at videolan.org
Mon Dec 21 00:02:30 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Dec 20 16:35:28 2009 +0100| [b195f843ab63a911c35ac2d09b5be1d1dc3a744a] | committer: Laurent Aimar 

Fixed initial timestamp value in TS demuxer.

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

 modules/demux/ts.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index 2590d30..bec293d 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -1822,13 +1822,11 @@ static void ParsePES( demux_t *p_demux, ts_pid_t *pid )
         int i;
 
         if( i_dts >= 0 )
-        {
-            p_pes->i_dts = i_dts * 100 / 9;
-        }
+            p_pes->i_dts = VLC_TS_0 + i_dts * 100 / 9;
+
         if( i_pts >= 0 )
-        {
-            p_pes->i_pts = i_pts * 100 / 9;
-        }
+            p_pes->i_pts = VLC_TS_0 + i_pts * 100 / 9;
+
         p_pes->i_length = i_length * 100 / 9;
 
         p_block = block_ChainGather( p_pes );
@@ -1882,7 +1880,7 @@ static void PCRHandle( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
                 {
                     es_out_Control( p_demux->out, ES_OUT_SET_GROUP_PCR,
                                     (int)p_sys->pmt[i]->psi->prg[i_prg]->i_number,
-                                    (int64_t)(i_pcr * 100 / 9) );
+                                    (int64_t)(VLC_TS_0 + i_pcr * 100 / 9) );
                 }
             }
         }




More information about the vlc-devel mailing list