[vlc-devel] commit: rawvideo: use VLC_TS_INVALID (refs #3135) ( Rafaël Carré )

git version control git at videolan.org
Mon Dec 7 17:55:08 CET 2009


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Mon Dec  7 17:34:04 2009 +0100| [62538aeaf74ff89d1e67d00f7cd92557e29a0316] | committer: Rafaël Carré 

rawvideo: use VLC_TS_INVALID (refs #3135)

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

 modules/codec/rawvideo.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/codec/rawvideo.c b/modules/codec/rawvideo.c
index db6e82e..27b0b02 100644
--- a/modules/codec/rawvideo.c
+++ b/modules/codec/rawvideo.c
@@ -205,7 +205,8 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
     p_block = *pp_block;
 
 
-    if( !p_block->i_pts && !p_block->i_dts && !date_Get( &p_sys->pts ) )
+    if( p_block->i_pts <= VLC_TS_INVALID && p_block->i_dts <= VLC_TS_INVALID &&
+        !date_Get( &p_sys->pts ) )
     {
         /* We've just started the stream, wait for the first PTS. */
         block_Release( p_block );
@@ -213,11 +214,11 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
     }
 
     /* Date management: If there is a pts avaliable, use that. */
-    if( p_block->i_pts )
+    if( p_block->i_pts > VLC_TS_INVALID )
     {
         date_Set( &p_sys->pts, p_block->i_pts );
     }
-    else if( p_block->i_dts )
+    else if( p_block->i_dts > VLC_TS_INVALID )
     {
         /* NB, davidf doesn't quite agree with this in general, it is ok
          * for rawvideo since it is in order (ie pts=dts), however, it




More information about the vlc-devel mailing list