diff options
author | Max Kellermann <max@duempel.org> | 2010-01-06 09:54:09 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-01-06 10:17:16 +0100 |
commit | a942384fbf4bc939086671a1741ee72244a70f28 (patch) | |
tree | 04a4c51ef656f29ef299d4b64570bd48a5f04a12 /src/decoder/flac_decoder_plugin.c | |
parent | de0cdee4aaf891f69b876134c14dd7df6af4f331 (diff) | |
download | mpd-a942384fbf4bc939086671a1741ee72244a70f28.tar.gz mpd-a942384fbf4bc939086671a1741ee72244a70f28.tar.xz mpd-a942384fbf4bc939086671a1741ee72244a70f28.zip |
decoder/flac: support streams without STREAMINFO block
Diffstat (limited to '')
-rw-r--r-- | src/decoder/flac_decoder_plugin.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/decoder/flac_decoder_plugin.c b/src/decoder/flac_decoder_plugin.c index d139354b8..022ee7045 100644 --- a/src/decoder/flac_decoder_plugin.c +++ b/src/decoder/flac_decoder_plugin.c @@ -247,6 +247,18 @@ flac_decoder_initialize(struct flac_data *data, FLAC__StreamDecoder *sd, return false; } + if (data->initialized) + /* done */ + return true; + + if (data->input_stream->seekable) + /* allow the workaround below only for nonseekable + streams*/ + return false; + + /* no stream_info packet found; try to initialize the decoder + from the first frame header */ + FLAC__stream_decoder_process_single(sd); return data->initialized; } |