[vlc-commits] codec: synchro: use VLC_TICK_INVALID to signal unknown DTS

Steve Lhomme git at videolan.org
Wed Sep 19 11:58:16 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed May  9 11:02:53 2018 +0200| [fa53167c086a62a227b78af4f8d1fe9cdebf0c15] | committer: Steve Lhomme

codec: synchro: use VLC_TICK_INVALID to signal unknown DTS

otherwise a DTS of 0 is not allowed

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

 modules/codec/libmpeg2.c | 4 ++--
 modules/codec/synchro.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c
index 0f54b07f57..b75c5e276f 100644
--- a/modules/codec/libmpeg2.c
+++ b/modules/codec/libmpeg2.c
@@ -333,7 +333,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
                 /* Intra-slice refresh. Simulate a blank I picture. */
                 msg_Dbg( p_dec, "intra-slice refresh stream" );
                 decoder_SynchroNewPicture( p_sys->p_synchro,
-                                           I_CODING_TYPE, 2, VLC_TICK_INVALID, 0,
+                                           I_CODING_TYPE, 2, VLC_TICK_INVALID, VLC_TICK_INVALID,
                                            p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
                 decoder_SynchroDecode( p_sys->p_synchro );
                 decoder_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 );
@@ -483,7 +483,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
                 if( p_sys->b_slice_i )
                 {
                     decoder_SynchroNewPicture( p_sys->p_synchro,
-                                               I_CODING_TYPE, 2, VLC_TICK_INVALID, 0,
+                                               I_CODING_TYPE, 2, VLC_TICK_INVALID, VLC_TICK_INVALID,
                                                p_sys->p_info->sequence->flags &
                                                             SEQ_FLAG_LOW_DELAY );
                     decoder_SynchroDecode( p_sys->p_synchro );
diff --git a/modules/codec/synchro.c b/modules/codec/synchro.c
index 816a82b37e..094ac32206 100644
--- a/modules/codec/synchro.c
+++ b/modules/codec/synchro.c
@@ -519,7 +519,7 @@ void decoder_SynchroNewPicture( decoder_synchro_t * p_synchro, int i_coding_type
 
         if( p_synchro->backward_pts )
         {
-            if( next_dts &&
+            if( next_dts != VLC_TICK_INVALID &&
                 (next_dts - p_synchro->backward_pts
                     > PTS_THRESHOLD
                   || p_synchro->backward_pts - next_dts
@@ -542,7 +542,7 @@ void decoder_SynchroNewPicture( decoder_synchro_t * p_synchro, int i_coding_type
             p_synchro->current_pts = p_synchro->backward_pts;
             p_synchro->backward_pts = 0;
         }
-        else if( next_dts )
+        else if( next_dts != VLC_TICK_INVALID )
         {
             if( (next_dts - p_synchro->current_pts
                     > PTS_THRESHOLD



More information about the vlc-commits mailing list