diff options
author | wm4 <wm4@nowhere> | 2013-11-03 18:50:00 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-03 18:50:00 +0100 |
commit | 847cbe9d5d03c77491f3139dde6e163426283ccb (patch) | |
tree | 76acc956c53b97410b366c2f6f10a9eb0561a621 /mpvcore | |
parent | 22274f7982e01784a27daac371fe2a1607433425 (diff) | |
download | mpv-847cbe9d5d03c77491f3139dde6e163426283ccb.tar.bz2 mpv-847cbe9d5d03c77491f3139dde6e163426283ccb.tar.xz |
demux: remove movi_start/movi_end fields
Pointless, using stream->start_pos/end_pos instead.
demux_mf was the only place where this was used specially, but we can
rely on timestamps instead for this case.
Diffstat (limited to 'mpvcore')
-rw-r--r-- | mpvcore/player/playloop.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mpvcore/player/playloop.c b/mpvcore/player/playloop.c index 8efb6d6693..9e5aa1e0b4 100644 --- a/mpvcore/player/playloop.c +++ b/mpvcore/player/playloop.c @@ -452,11 +452,12 @@ double get_current_pos_ratio(struct MPContext *mpctx, bool use_range) if (len > 0 && !demuxer->ts_resets_possible) { ans = MPCLAMP((pos - start) / len, 0, 1); } else { - int64_t size = (demuxer->movi_end - demuxer->movi_start); + struct stream *s = demuxer->stream; + int64_t size = s->end_pos - s->start_pos; int64_t fpos = demuxer->filepos > 0 ? demuxer->filepos : stream_tell(demuxer->stream); if (size > 0) - ans = MPCLAMP((double)(fpos - demuxer->movi_start) / size, 0, 1); + ans = MPCLAMP((double)(fpos - s->start_pos) / size, 0, 1); } if (use_range) { if (mpctx->opts->play_frames > 0) |