Commit 4d069b49 authored by Max Kellermann's avatar Max Kellermann

ogg, ffmpeg: try to decode, even when the stream is not seekable

Ogg and ffmpeg detection was disabled when the stream was not seekable, because the detection was too expensive. Since the curl input stream can now rewind the stream cheaply, we can re-enable detection on streams.
parent 460b15d2
......@@ -210,7 +210,7 @@ ffmpeg_helper(struct input_stream *input, bool (*callback)(BasePtrs *ptrs),
static bool
ffmpeg_try_decode(struct input_stream *input)
{
return input->seekable && ffmpeg_helper(input, NULL, NULL);
return ffmpeg_helper(input, NULL, NULL);
}
static enum decoder_command
......
......@@ -281,11 +281,6 @@ static struct tag *oggflac_TagDup(const char *file)
static bool oggflac_try_decode(struct input_stream *inStream)
{
if (!inStream->seekable)
/* we cannot seek after the detection, so don't bother
checking */
return true;
return ogg_stream_type_detect(inStream) == FLAC;
}
......
......@@ -364,11 +364,6 @@ static struct tag *oggvorbis_TagDup(const char *file)
static bool
oggvorbis_try_decode(struct input_stream *inStream)
{
if (!inStream->seekable)
/* we cannot seek after the detection, so don't bother
checking */
return true;
return ogg_stream_type_detect(inStream) == VORBIS;
}
......
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