[vlc-devel] commit: Used VLC_TS_INVALID/0 in PVA demuxer. (Laurent Aimar )

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


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Dec 20 21:22:49 2009 +0100| [0e8f9f2e12894f677755756c5a04420ee9023c7a] | committer: Laurent Aimar 

Used VLC_TS_INVALID/0 in PVA demuxer.

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

 modules/demux/pva.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/modules/demux/pva.c b/modules/demux/pva.c
index 6b449bd..fad9247 100644
--- a/modules/demux/pva.c
+++ b/modules/demux/pva.c
@@ -207,7 +207,7 @@ static int Demux( demux_t *p_demux )
                 if( ( p_frame = p_sys->p_es ) )
                 {
 
-                    if( p_frame->i_pts > 0 && !p_sys->b_pcr_audio )
+                    if( p_frame->i_pts > VLC_TS_INVALID && !p_sys->b_pcr_audio )
                     {
                         es_out_Control( p_demux->out, ES_OUT_SET_PCR, (int64_t)p_frame->i_pts);
                     }
@@ -221,7 +221,8 @@ static int Demux( demux_t *p_demux )
             {
                 p_frame->p_buffer += i_skip;
                 p_frame->i_buffer -= i_skip;
-                if( i_pts > 0 ) p_frame->i_pts = i_pts * 100 / 9;
+                if( i_pts >= 0 )
+                    p_frame->i_pts = VLC_TS_0 + i_pts * 100 / 9;
                 block_ChainAppend( &p_sys->p_es, p_frame );
             }
             break;
@@ -427,8 +428,10 @@ static void ParsePES( demux_t *p_demux )
     p_pes->i_buffer -= i_skip;
     p_pes->p_buffer += i_skip;
 
-    if( i_dts >= 0 ) p_pes->i_dts = i_dts * 100 / 9;
-    if( i_pts >= 0 ) p_pes->i_pts = i_pts * 100 / 9;
+    if( i_dts >= 0 )
+        p_pes->i_dts = VLC_TS_0 + i_dts * 100 / 9;
+    if( i_pts >= 0 )
+        p_pes->i_pts = VLC_TS_0 + i_pts * 100 / 9;
 
     /* Set PCR */
     if( p_pes->i_pts > 0 )




More information about the vlc-devel mailing list