[vlc-commits] demux:mkv: fix the invalid value init for i_skip_until_fpos
Steve Lhomme
git at videolan.org
Wed Feb 14 13:46:16 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Feb 14 09:32:41 2018 +0100| [31897aaf4bf7bf594dc52a486977097fccdee09b] | committer: Steve Lhomme
demux:mkv: fix the invalid value init for i_skip_until_fpos
There was mismatches between -1 and std::numeric_limits<uint64_t>::max().
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=31897aaf4bf7bf594dc52a486977097fccdee09b
---
modules/demux/mkv/matroska_segment.cpp | 4 ++--
modules/demux/mkv/mkv.cpp | 4 ++--
modules/demux/mkv/mkv.hpp | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 16040bbecc..01d0e770db 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -810,7 +810,7 @@ bool matroska_segment_c::InternalSeek( demux_t &demuxer, mtime_t i_absolute_mk_d
{
mkv_track_t &track = *it->second;
- track.i_skip_until_fpos = -1;
+ track.i_skip_until_fpos = std::numeric_limits<uint64_t>::max();
if( track.i_last_dts > VLC_TS_INVALID )
track.b_discontinuity = true;
track.i_last_dts = VLC_TS_INVALID;
@@ -863,7 +863,7 @@ bool matroska_segment_c::InternalSeek( demux_t &demuxer, mtime_t i_absolute_mk_d
if ( b_accurate )
trackit->second->i_skip_until_fpos = it->second.fpos;
else
- trackit->second->i_skip_until_fpos = -1;
+ trackit->second->i_skip_until_fpos = std::numeric_limits<uint64_t>::max();
trackit->second->i_last_dts = it->second.pts;
msg_Dbg( &sys.demuxer, "seek: preroll{ track: %u, pts: %" PRId64 ", fpos: %" PRIu64 " skip: %" PRIu64 "} ",
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 86b4a3ad26..0b634fc912 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -764,7 +764,7 @@ static int Demux( demux_t *p_demux)
return 1; // this block shall be ignored
}
- track.i_skip_until_fpos = -1;
+ track.i_skip_until_fpos = std::numeric_limits<uint64_t>::max();
}
}
@@ -839,7 +839,7 @@ mkv_track_t::mkv_track_t(enum es_format_category_e es_cat) :
,i_default_duration(0)
,f_timecodescale(1.0)
,i_last_dts(0)
- ,i_skip_until_fpos(-1)
+ ,i_skip_until_fpos(std::numeric_limits<uint64_t>::max())
,f_fps(0)
,p_es(NULL)
,i_original_rate(0)
diff --git a/modules/demux/mkv/mkv.hpp b/modules/demux/mkv/mkv.hpp
index 59adc48eb9..c4da69c4f8 100644
--- a/modules/demux/mkv/mkv.hpp
+++ b/modules/demux/mkv/mkv.hpp
@@ -205,7 +205,7 @@ class mkv_track_t
uint64_t i_default_duration;
float f_timecodescale;
mtime_t i_last_dts;
- uint64_t i_skip_until_fpos;
+ uint64_t i_skip_until_fpos; /*< any block before this fpos should be ignored */
/* video */
es_format_t fmt;
More information about the vlc-commits
mailing list