[vlc-devel] [PATCH] Use frame defaut duration for MKV lace pts
Denis Charmet
typx at dinauz.org
Thu Feb 16 22:57:21 CET 2012
This is used in many other MKV demux and prevents the pts = dts = 0 in every lace. Fix #5165
---
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..5b07914 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;
}
}
--
1.7.8.3
More information about the vlc-devel
mailing list