aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-11 20:36:21 +0100
committerMax Kellermann <max@duempel.org>2009-11-11 20:36:21 +0100
commit5b2d32b4992f6df38bd738c7b765c42bd9a3ad0e (patch)
tree694c4ba1e3136025e9223068cf208739c1ac9e3a /src
parente0d5ee00451630c83ba1693939aa6c923f41b727 (diff)
downloadmpd-5b2d32b4992f6df38bd738c7b765c42bd9a3ad0e.tar.gz
mpd-5b2d32b4992f6df38bd738c7b765c42bd9a3ad0e.tar.xz
mpd-5b2d32b4992f6df38bd738c7b765c42bd9a3ad0e.zip
decoder/oggflac: moved stream_info check to oggflac_decode()
Diffstat (limited to 'src')
-rw-r--r--src/decoder/oggflac_plugin.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/decoder/oggflac_plugin.c b/src/decoder/oggflac_plugin.c
index e47cacd49..6d71c3ad3 100644
--- a/src/decoder/oggflac_plugin.c
+++ b/src/decoder/oggflac_plugin.c
@@ -232,12 +232,6 @@ full_decoder_init_and_read_metadata(struct flac_data *data,
goto fail;
}
- if (!data->have_stream_info) {
- OggFLAC__seekable_stream_decoder_delete(decoder);
- g_warning("no STREAMINFO packet found");
- return NULL;
- }
-
return decoder;
fail:
@@ -308,6 +302,11 @@ oggflac_decode(struct decoder * mpd_decoder, struct input_stream *input_stream)
goto fail;
}
+ if (!data.have_stream_info) {
+ g_warning("no STREAMINFO packet found");
+ goto fail;
+ }
+
if (!audio_format_valid(&data.audio_format)) {
g_warning("Invalid audio format: %u:%u:%u\n",
data.audio_format.sample_rate,