[vlc-devel] [PATCH 1/2] demux: mkv: flag prerolled blocks

Francois Cartegnie fcvlcdev at free.fr
Thu Aug 4 12:02:25 CEST 2016


helps avcodec not increasing late frames
---
 modules/demux/mkv/mkv.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 8fb66b6..0c90e4b 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -677,6 +677,9 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
             }
         }
 
+        if( p_block->i_dts < p_sys->i_start_pts )
+            p_block->i_flags |= BLOCK_FLAG_PREROLL;
+
         send_Block( p_demux, &track, p_block, i_number_frames, i_duration );
 
         /* use time stamp only for first block */
-- 
2.7.4



More information about the vlc-devel mailing list