summaryrefslogtreecommitdiffstats
path: root/gst/apetag
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-12-04 11:44:47 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-12-04 11:44:47 +0000
commit4f3815cb3a8e4648cbb7f69f97b4f74ac7439edc (patch)
tree62ce079181d1c58dbae12bad313e3e89b1dd9e8e /gst/apetag
parent4725ef13cde17be5a40d9f08528a77381abf7299 (diff)
downloadgst-plugins-bad-4f3815cb3a8e4648cbb7f69f97b4f74ac7439edc.tar.gz
gst-plugins-bad-4f3815cb3a8e4648cbb7f69f97b4f74ac7439edc.tar.bz2
gst-plugins-bad-4f3815cb3a8e4648cbb7f69f97b4f74ac7439edc.zip
gst/apetag/apedemux.c: Let's make sure we're done typefinding when detecting tags.
Original commit message from CVS: * gst/apetag/apedemux.c: (gst_ape_demux_stream_init): Let's make sure we're done typefinding when detecting tags.
Diffstat (limited to 'gst/apetag')
-rw-r--r--gst/apetag/apedemux.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gst/apetag/apedemux.c b/gst/apetag/apedemux.c
index 8767f1c3..0722595c 100644
--- a/gst/apetag/apedemux.c
+++ b/gst/apetag/apedemux.c
@@ -524,6 +524,14 @@ gst_ape_demux_stream_init (GstApeDemux * ape)
/* start off, we'll want byte-reading here */
bs = gst_bytestream_new (ape->sinkpad);
+ /* peek one byte to not confuse the typefinder */
+ while (gst_bytestream_peek_bytes (bs, &data, 1) != 1) {
+ if (!gst_ape_demux_handle_event (ape, bs)) {
+ res = FALSE;
+ goto the_city;
+ }
+ }
+
/* can we seek? */
if (!gst_bytestream_seek (bs, 0, GST_SEEK_METHOD_END)) {
seekable = FALSE;
@@ -599,6 +607,7 @@ gst_ape_demux_stream_init (GstApeDemux * ape)
goto the_city;
}
}
+
if (!memcmp (data, "APETAGEX", 8)) {
GST_LOG ("Found tags at end");