aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--NEWS1
-rw-r--r--src/decoder/oggflac_plugin.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 33cf15b15..c04241c34 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ ver 0.15.6 (2009/??/??)
- zzip: require libzzip 0.13
* decoders:
- ffmpeg: convert metadata
+ - oggflac: rewind stream after FLAC detection
* output_thread: check again if output is open on PAUSE
* update: delete ignored symlinks from database
* database: increased maximum line length to 32 kB
diff --git a/src/decoder/oggflac_plugin.c b/src/decoder/oggflac_plugin.c
index fedfdcb48..c0e7e35e1 100644
--- a/src/decoder/oggflac_plugin.c
+++ b/src/decoder/oggflac_plugin.c
@@ -272,6 +272,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();
@@ -300,6 +304,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))) {