input_stream: add method _cheap_seeking()

Move code from the Vorbis decoder plugin.
This commit is contained in:
Max Kellermann
2013-01-07 23:23:58 +01:00
parent acb45caa42
commit 960b9a9664
4 changed files with 17 additions and 3 deletions

View File

@@ -139,9 +139,7 @@ vorbis_is_open(struct vorbis_input_stream *vis, OggVorbis_File *vf,
{
vis->decoder = decoder;
vis->input_stream = input_stream;
vis->seekable = input_stream->seekable &&
(input_stream->uri == NULL ||
!uri_has_scheme(input_stream->uri));
vis->seekable = input_stream_cheap_seeking(input_stream);
int ret = ov_open_callbacks(vis, vf, NULL, 0, vorbis_is_callbacks);
if (ret < 0) {