[vlc-commits] demux: mp4: no sync table means all sync

Francois Cartegnie git at videolan.org
Fri May 22 17:34:35 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri May 22 15:38:01 2020 +0200| [712624978f114b4bfdca88e8d89ac5bc54a0d6b4] | committer: Francois Cartegnie

demux: mp4: no sync table means all sync

A.7 3) The absence of the sync sample table indicates that all
samples are synchronization points

ref VLCKit/-/issues/367

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

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

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 51df3e4f1f..161e09e50a 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -1817,7 +1817,6 @@ static int FragSeekToTime( demux_t *p_demux, vlc_tick_t i_nztime, bool b_accurat
     uint32_t i_segment_type = ATOM_moof;
     stime_t  i_segment_time = INVALID_SEGMENT_TIME;
     vlc_tick_t i_sync_time = i_nztime;
-    bool b_iframesync = false;
 
     const uint64_t i_duration = __MAX(p_sys->i_duration, p_sys->i_cumulated_duration);
     if ( !p_sys->i_timescale || !i_duration || !p_sys->b_seekable )
@@ -1852,7 +1851,6 @@ static int FragSeekToTime( demux_t *p_demux, vlc_tick_t i_nztime, bool b_accurat
         {
             /* Does only provide segment position and a sync sample time */
             msg_Dbg( p_demux, "seeking to sync point %" PRId64, i_sync_time );
-            b_iframesync = true;
         }
         else if( !p_sys->b_fragments_probed )
         {
@@ -1906,7 +1904,7 @@ static int FragSeekToTime( demux_t *p_demux, vlc_tick_t i_nztime, bool b_accurat
             p_sys->i_nztime = i_sync_time;
             p_sys->i_pcr  = VLC_TICK_INVALID;
         }
-        else if( b_iframesync )
+        else
         {
             stime_t i_tst = MP4_rescale_qtime( i_sync_time, p_sys->track[i].i_timescale );
             FragTrunSeekToTime( &p_sys->track[i], i_tst );
@@ -1916,7 +1914,7 @@ static int FragSeekToTime( demux_t *p_demux, vlc_tick_t i_nztime, bool b_accurat
 
     MP4ASF_ResetFrames( p_sys );
     /* And set next display time in that trun/fragment */
-    if( b_iframesync && b_accurate )
+    if( b_accurate )
         es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TICK_0 + i_nztime );
     return VLC_SUCCESS;
 }



More information about the vlc-commits mailing list