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.
This commit is contained in:
parent
460b15d29c
commit
4d069b4991
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user