[vlc-commits] mux:mp4: excplicitly test vlc_tick_t values against 0

Steve Lhomme git at videolan.org
Tue Sep 18 14:08:07 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun 11 17:52:04 2018 +0200| [7cfb5318a9973484f51873c27732edef9896e0eb] | committer: Steve Lhomme

mux:mp4: excplicitly test vlc_tick_t values against 0

This will help knowning if it's VLC_TICK_0/VLC_TICK_INVALID or the actual value 0

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

 modules/mux/mp4/libmp4mux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c
index cac07aaf62..92e7b1fe32 100644
--- a/modules/mux/mp4/libmp4mux.c
+++ b/modules/mux/mp4/libmp4mux.c
@@ -192,7 +192,7 @@ static bo_t *GetEDTS( mp4mux_trackinfo_t *p_track, uint32_t i_movietimescale, bo
     for(unsigned i=0; i<p_track->i_edits_count; i++)
     {
         /* !WARN! media time must start sample time 0, we need a -1 edit for start offsets */
-        if(p_track->p_edits[i].i_start_offset)
+        if(p_track->p_edits[i].i_start_offset != 0)
             i_total_edits++;
     }
 
@@ -200,7 +200,7 @@ static bo_t *GetEDTS( mp4mux_trackinfo_t *p_track, uint32_t i_movietimescale, bo
 
     for(unsigned i=0; i<p_track->i_edits_count; i++)
     {
-        if(p_track->p_edits[i].i_start_offset)
+        if(p_track->p_edits[i].i_start_offset != 0)
         {
             AddEdit(elst,
                     p_track->p_edits[i].i_start_offset * i_movietimescale / CLOCK_FREQ,



More information about the vlc-commits mailing list