[vlc-devel] [PATCH 06/14] mkv: tweaked diagnostic when seeking
Filip Roséen
filip at videolabs.io
Wed Mar 9 12:50:01 CET 2016
Outputting the percentage when we do not have any (-1.f) is of no use,
this patch properly makes use diagnose what we actually have (either a
fixed location, or the percentage).
---
modules/demux/mkv/mkv.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index cd31bb7..33a19cd 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -441,7 +441,9 @@ static void Seek( demux_t *p_demux, mtime_t i_mk_date, double f_percent, virtual
matroska_segment_c *p_segment = p_vsegment->CurrentSegment();
int64_t i_global_position = -1;
- msg_Dbg( p_demux, "seek request to %" PRId64 " (%.2f%%)", i_mk_date, f_percent * 100);
+ if( f_percent < 0 ) msg_Dbg( p_demux, "seek request to i_pos = %" PRId64, i_mk_date );
+ else msg_Dbg( p_demux, "seek request to %.2f%%", f_percent * 100 );
+
if( i_mk_date < 0 && f_percent < 0 )
{
msg_Warn( p_demux, "cannot seek nowhere!" );
--
2.7.2
More information about the vlc-devel
mailing list