[vlc-devel] [PATCH] MKV: packetized codec can use VLC_TS_INVALID as i_pts for extra Block frames

Steve Lhomme robUx4 at videolabs.io
Wed Mar 18 13:53:53 CET 2015


Fixes WMA 9.1 Lossless playback through avcodec
---
 modules/demux/mkv/mkv.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 362cd4f..7b399bd 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -722,7 +722,7 @@ msg_Dbg( p_demux, "block (track=%d) i_dts: %"PRId64" / i_pts: %"PRId64, tk->i_nu
         /* use time stamp only for first block */
         i_pts = ( tk->i_default_duration )?
                  i_pts + ( mtime_t )tk->i_default_duration:
-                 VLC_TS_INVALID;
+                 ( tk->fmt.b_packetized ) ? VLC_TS_INVALID : i_pts + 1;
     }
 }
 
-- 
2.3.2




More information about the vlc-devel mailing list