[vlc-devel] commit: schroedinger: 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:36:45 2009 +0100| [97c5499da925882b7a010e84ca3101ce5608856b] | committer: Rafaël Carré 

schroedinger: use VLC_TS_INVALID (refs #3135)

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

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

diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c
index 162fd8b..8439c04 100644
--- a/modules/codec/schroedinger.c
+++ b/modules/codec/schroedinger.c
@@ -111,7 +111,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     p_dec->p_sys = p_sys;
     p_sys->p_schro = p_schro;
     p_sys->p_format = NULL;
-    p_sys->i_lastpts = -1;
+    p_sys->i_lastpts = VLC_TS_INVALID;
     p_sys->i_frame_pts_delta = 0;
 
     /* Set output properties */
@@ -299,7 +299,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY ) {
             schro_decoder_reset( p_sys->p_schro );
 
-            p_sys->i_lastpts = -1;
+            p_sys->i_lastpts = VLC_TS_INVALID;
             block_Release( p_block );
             *pp_block = NULL;
             return NULL;
@@ -309,7 +309,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         p_schrobuffer = schro_buffer_new_with_data( p_block->p_buffer, p_block->i_buffer );
         p_schrobuffer->free = SchroBufferFree;
         p_schrobuffer->priv = p_block;
-        if( p_block->i_pts != VLC_TS_INVALID ) {
+        if( p_block->i_pts > VLC_TS_INVALID ) {
             mtime_t *p_pts = malloc( sizeof(*p_pts) );
             if( p_pts ) {
                 *p_pts = p_block->i_pts;
@@ -372,7 +372,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
                 p_pic->date = *(mtime_t*) p_tag->value;
                 schro_tag_free( p_tag );
             }
-            else if( p_sys->i_lastpts >= 0 )
+            else if( p_sys->i_lastpts > VLC_TS_INVALID )
             {
                 /* NB, this shouldn't happen since the packetizer does a
                  * very thorough job of inventing timestamps.  The




More information about the vlc-devel mailing list