[vlc-commits] [Git][videolan/vlc][master] 2 commits: demux: mp4: elst can only change if there's one

François Cartegnie (@fcartegnie) gitlab at videolan.org
Fri Dec 23 15:45:11 UTC 2022



François Cartegnie pushed to branch master at VideoLAN / VLC


Commits:
0e3d3c06 by Francois Cartegnie at 2022-12-23T15:15:18+00:00
demux: mp4: elst can only change if there's one

- - - - -
203fb201 by Francois Cartegnie at 2022-12-23T15:15:18+00:00
demux: mp4: do not flag discontinuity after empty edit

refs #26943

- - - - -


1 changed file:

- modules/demux/mp4/mp4.c


Changes:

=====================================
modules/demux/mp4/mp4.c
=====================================
@@ -4170,11 +4170,14 @@ static void MP4_TrackSetELST( demux_t *p_demux, mp4_track_t *tk,
             /* track offset */
             tk->i_elst_time += elst->i_segment_duration[tk->i_elst];
         }
-    }
-    if( i_elst_last != tk->i_elst )
-    {
-        msg_Warn( p_demux, "elst old=%d new=%"PRIu32, i_elst_last, tk->i_elst );
-        tk->i_next_block_flags |= BLOCK_FLAG_DISCONTINUITY;
+
+        if( i_elst_last != tk->i_elst )
+        {
+            msg_Warn( p_demux, "elst old=%d new=%"PRIu32, i_elst_last, tk->i_elst );
+            if( i_elst_last < elst->i_entry_count &&
+                elst->i_media_time[i_elst_last] >= 0 )
+                tk->i_next_block_flags |= BLOCK_FLAG_DISCONTINUITY;
+        }
     }
 }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a0e968bb8918df985ed45ddfde84c58c1bd68a33...203fb201da9c44bf5d68c937a071f5a8f25fda2f

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a0e968bb8918df985ed45ddfde84c58c1bd68a33...203fb201da9c44bf5d68c937a071f5a8f25fda2f
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list