Commit 31897aaf authored by Steve Lhomme's avatar 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().
parent 7f53a245
......@@ -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 "} ",
......
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment