[vlc-commits] MKV: Use frame defaut duration for MKV lace pts
Denis Charmet
git at videolan.org
Fri Feb 17 00:57:26 CET 2012
vlc/vlc-2.0 | branch: master | Denis Charmet <typx at dinauz.org> | Thu Feb 16 22:57:21 2012 +0100| [5c96b27de4d29217ad8f546484d82957e5a3f090] | committer: Jean-Baptiste Kempf
MKV: Use frame defaut duration for MKV lace pts
This is used in many other MKV demux and prevents the pts = dts = 0 in every lace.
Fix #5165
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 562813603621bf160868d355f30def8e0a10029a)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=5c96b27de4d29217ad8f546484d82957e5a3f090
---
modules/demux/mkv/mkv.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 7be24c8..e8a67ea 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -617,7 +617,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
if ( f_mandatory )
p_block->i_dts = p_block->i_pts;
else
- p_block->i_dts = min( i_pts, tk->i_last_dts + (mtime_t)(tk->i_default_duration >> 10));
+ p_block->i_dts = min( i_pts, tk->i_last_dts + ( mtime_t )( tk->i_default_duration / 1000 ) );
}
}
tk->i_last_dts = p_block->i_dts;
@@ -639,7 +639,9 @@ msg_Dbg( p_demux, "block i_dts: %"PRId64" / i_pts: %"PRId64, p_block->i_dts, p_b
es_out_Send( p_demux->out, tk->p_es, p_block );
/* use time stamp only for first block */
- i_pts = VLC_TS_INVALID;
+ i_pts = ( tk->i_default_duration )?
+ i_pts + ( mtime_t )( tk->i_default_duration / 1000 ):
+ VLC_TS_INVALID;
}
}
More information about the vlc-commits
mailing list