[vlc-commits] MKV: don't use i_last_dts if it's invalid

Steve Lhomme git at videolan.org
Mon Mar 16 10:12:59 CET 2015


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Mon Mar 16 09:17:18 2015 +0100| [bf6f6714f12ca786e6ce16fbbc1cbcb0e45a8f14] | committer: Jean-Baptiste Kempf

MKV: don't use i_last_dts if it's invalid

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/demux/mkv/mkv.cpp |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 5e183b9..0269393 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -671,6 +671,8 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
                 // condition when the DTS is correct (keyframe or B frame == NOT P frame)
                 if ( b_key_picture || b_discardable_picture )
                     p_block->i_dts = p_block->i_pts;
+                else if ( tk->i_last_dts == VLC_TS_INVALID )
+                    p_block->i_dts = i_pts;
                 else
                     p_block->i_dts = min( i_pts, tk->i_last_dts + ( mtime_t )tk->i_default_duration );
             }



More information about the vlc-commits mailing list