aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/oggflac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-11 15:14:20 +0100
committerMax Kellermann <max@duempel.org>2009-11-11 15:14:20 +0100
commit5cc3c4f5039cc57b414de3b94bb3ab0e54f28556 (patch)
treec466f210381ac70e1dd84aa10d529cb6c31394cd /src/decoder/oggflac_plugin.c
parent96204ea3dc70521b6df1b01dd6f7c799e6d42ec1 (diff)
parentdca4d9cf83849877206379a20a1e478ed1b5dc55 (diff)
downloadmpd-5cc3c4f5039cc57b414de3b94bb3ab0e54f28556.tar.gz
mpd-5cc3c4f5039cc57b414de3b94bb3ab0e54f28556.tar.xz
mpd-5cc3c4f5039cc57b414de3b94bb3ab0e54f28556.zip
Merge remote branch 'origin/v0.15.x'
Diffstat (limited to '')
-rw-r--r--src/decoder/oggflac_plugin.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/decoder/oggflac_plugin.c b/src/decoder/oggflac_plugin.c
index 8fc2a6c96..d4ba7b213 100644
--- a/src/decoder/oggflac_plugin.c
+++ b/src/decoder/oggflac_plugin.c
@@ -261,6 +261,10 @@ oggflac_tag_dup(const char *file)
return NULL;
}
+ /* rewind the stream, because ogg_stream_type_detect() has
+ moved it */
+ input_stream_seek(&input_stream, 0, SEEK_SET);
+
flac_data_init(&data, NULL, &input_stream);
data.tag = tag_new();
@@ -292,6 +296,10 @@ oggflac_decode(struct decoder * mpd_decoder, struct input_stream *input_stream)
if (ogg_stream_type_detect(input_stream) != FLAC)
return;
+ /* rewind the stream, because ogg_stream_type_detect() has
+ moved it */
+ input_stream_seek(input_stream, 0, SEEK_SET);
+
flac_data_init(&data, mpd_decoder, input_stream);
if (!(decoder = full_decoder_init_and_read_metadata(&data, 0))) {