mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +00:00
demux: make claiming accurate seek the default
Enables hr-seek for raw audio/video demuxers.
This commit is contained in:
parent
5de4a3ecc0
commit
6c1e9e4a45
@ -534,6 +534,7 @@ static struct demuxer *open_given_type(struct MPOpts *opts,
|
|||||||
.movi_start = stream->start_pos,
|
.movi_start = stream->start_pos,
|
||||||
.movi_end = stream->end_pos,
|
.movi_end = stream->end_pos,
|
||||||
.seekable = 1,
|
.seekable = 1,
|
||||||
|
.accurate_seek = true,
|
||||||
.filepos = -1,
|
.filepos = -1,
|
||||||
.opts = opts,
|
.opts = opts,
|
||||||
.filename = talloc_strdup(demuxer, stream->url),
|
.filename = talloc_strdup(demuxer, stream->url),
|
||||||
|
@ -1803,8 +1803,6 @@ static int demux_mkv_open(demuxer_t *demuxer, enum demux_check check)
|
|||||||
demuxer->seekable = 1;
|
demuxer->seekable = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
demuxer->accurate_seek = true;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,6 +421,9 @@ static int demux_mng_open(demuxer_t * demuxer, enum demux_check check)
|
|||||||
sh_video->bih->biBitCount = 32;
|
sh_video->bih->biBitCount = 32;
|
||||||
sh_video->bih->biPlanes = 1;
|
sh_video->bih->biPlanes = 1;
|
||||||
|
|
||||||
|
// weirdly broken
|
||||||
|
demuxer->accurate_seek = false;
|
||||||
|
|
||||||
// set private data in demuxer and return demuxer
|
// set private data in demuxer and return demuxer
|
||||||
demuxer->priv = mng_priv;
|
demuxer->priv = mng_priv;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1356,8 +1356,6 @@ static int d_open_file(struct demuxer *demuxer, enum demux_check check)
|
|||||||
add_sub_data(demuxer, sd);
|
add_sub_data(demuxer, sd);
|
||||||
subdata_free(sd);
|
subdata_free(sd);
|
||||||
|
|
||||||
demuxer->accurate_seek = true;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user