From: <rb...@fr...> - 2004-12-04 11:44:17
|
CVS Root: /cvs/gstreamer Module: gst-plugins Changes by: rbultje Date: Sat Dec 04 2004 03:44:59 PST Log message: * gst/apetag/apedemux.c: (gst_ape_demux_stream_init): Let's make sure we're done typefinding when detecting tags. Modified files: . : ChangeLog gst/apetag : apedemux.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ChangeLog.diff?r1=1.1360&r2=1.1361 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/gst/apetag/apedemux.c.diff?r1=1.1&r2=1.2 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins/ChangeLog,v retrieving revision 1.1360 retrieving revision 1.1361 diff -u -d -r1.1360 -r1.1361 --- ChangeLog 3 Dec 2004 21:08:17 -0000 1.1360 +++ ChangeLog 4 Dec 2004 11:44:47 -0000 1.1361 @@ -1,3 +1,8 @@ +2004-12-04 Ronald S. Bultje <rb...@ro...> + + * gst/apetag/apedemux.c: (gst_ape_demux_stream_init): + Let's make sure we're done typefinding when detecting tags. 2004-12-03 Ronald S. Bultje <rb...@ro...> * gst/matroska/ebml-read.c: (gst_ebml_read_class_init), Index: apedemux.c RCS file: /cvs/gstreamer/gst-plugins/gst/apetag/apedemux.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- apedemux.c 25 Nov 2004 20:14:32 -0000 1.1 +++ apedemux.c 4 Dec 2004 11:44:47 -0000 1.2 @@ -524,6 +524,14 @@ /* 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 @@ goto the_city; } } if (!memcmp (data, "APETAGEX", 8)) { GST_LOG ("Found tags at end"); |