[vlc-commits] demux: avi: flag discontinuity on seek

Francois Cartegnie git at videolan.org
Fri Oct 6 11:00:37 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Oct  6 10:43:59 2017 +0200| [7f5b62aac481e55caefc494ad1f81caf9e18bef7] | committer: Francois Cartegnie

demux: avi: flag discontinuity on seek

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

 modules/demux/avi/avi.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 722b5a45c0..b58c23237f 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -155,6 +155,7 @@ typedef struct
 
     es_format_t     fmt;
     es_out_id_t     *p_es;
+    int             i_next_block_flags;
 
     int             i_dv_audio_rate;
     es_out_id_t     *p_es_dv_audio;
@@ -1323,6 +1324,12 @@ static int Demux_Seekable( demux_t *p_demux )
         if( tk->i_dv_audio_rate )
             AVI_DvHandleAudio( p_demux, tk, p_frame );
 
+        if( tk->i_next_block_flags )
+        {
+            p_frame->i_flags = tk->i_next_block_flags;
+            tk->i_next_block_flags = 0;
+        }
+
         if( tk->p_es )
             es_out_Send( p_demux->out, tk->p_es, p_frame );
         else
@@ -1612,6 +1619,8 @@ static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent, bool b_accurat
                 p_stream->b_eof = AVI_TrackSeek( p_demux, i_stream, i_wanted ) != 0;
                 if( !p_stream->b_eof )
                 {
+                    p_stream->i_next_block_flags |= BLOCK_FLAG_DISCONTINUITY;
+
                     if( p_stream->fmt.i_cat == AUDIO_ES || p_stream->fmt.i_cat == VIDEO_ES )
                         i_start = __MIN(i_start, AVI_GetPTS( p_stream ));
 



More information about the vlc-commits mailing list