[vlc-commits] demux: mp4: set discontinuity on edit list change

Francois Cartegnie git at videolan.org
Mon Oct 31 19:22:49 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Oct 31 17:04:24 2016 +0100| [7b52601d12d20d1974ea701638630431d17ce0f3] | committer: Francois Cartegnie

demux: mp4: set discontinuity on edit list change

fixes timestamp conversion errors using avcodec
refs samples/mov/editlist/menace00.mov

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

 modules/demux/mp4/mp4.c | 6 ++++++
 modules/demux/mp4/mp4.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 2d40167..15fbb59 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -443,6 +443,11 @@ static void MP4_Block_Send( demux_t *p_demux, mp4_track_t *p_track, block_t *p_b
     }
 
     p_block->i_flags |= p_track->i_block_flags;
+    if( p_track->i_next_block_flags )
+    {
+        p_block->i_flags |= p_track->i_next_block_flags;
+        p_track->i_next_block_flags = 0;
+    }
 
     /* ASF packets in mov */
     if( p_track->p_asf )
@@ -3582,6 +3587,7 @@ static void MP4_TrackSetELST( demux_t *p_demux, mp4_track_t *tk,
     if( i_elst_last != tk->i_elst )
     {
         msg_Warn( p_demux, "elst old=%d new=%d", i_elst_last, tk->i_elst );
+        tk->i_next_block_flags |= BLOCK_FLAG_DISCONTINUITY;
     }
 }
 
diff --git a/modules/demux/mp4/mp4.h b/modules/demux/mp4/mp4.h
index aaf2f01..47067d5 100644
--- a/modules/demux/mp4/mp4.h
+++ b/modules/demux/mp4/mp4.h
@@ -82,6 +82,7 @@ typedef struct
 
     es_format_t fmt;
     uint32_t    i_block_flags;
+    uint32_t    i_next_block_flags;
     uint8_t     rgi_chans_reordering[AOUT_CHAN_MAX];
     bool        b_chans_reorder;
     es_out_id_t *p_es;



More information about the vlc-commits mailing list