[vlc-devel] [PATCH] Avoid audio blocks with invalid pts and dts
Denis Charmet
typx at dinauz.org
Sat Jan 14 23:07:45 CET 2012
This will avoid the blocks to be wrongly flaged as preroll data
after seek.
Fix #5165.
---
modules/demux/mkv/mkv.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index ebbcafa..2c1087e 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -469,6 +469,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
{
demux_sys_t *p_sys = p_demux->p_sys;
matroska_segment_c *p_segment = p_sys->p_current_segment->CurrentSegment();
+ mtime_t i_dts = i_pts;
if( !p_segment ) return;
@@ -582,7 +583,8 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
// correct timestamping when B frames are used
if( tk->fmt.i_cat != VIDEO_ES )
{
- p_block->i_dts = p_block->i_pts = i_pts;
+ p_block->i_dts = i_dts + i;
+ p_block->i_pts = i_pts;
}
else
{
--
1.7.8.3
More information about the vlc-devel
mailing list