+2004-08-24 Sebastien Cote <sc5@hermes.usherb.ca>
+
+ * gst-libs/gst/riff/riff-read.c: (gst_riff_peek_head),
+ (gst_riff_read_element_data), (gst_riff_read_seek),
+ (gst_riff_read_skip): fix infinite loop in wavparse, fixes bug
+ #144616, patch reviewed by Ronald and committed by Christophe Fergeau
+ <teuf@gnome.org>
+
2004-08-23 Iain <iaingnome@gmail.com>
* ext/mad/gstid3tag.c (gst_mad_id3_to_tag_list): Special case COMM
/* Here, we might encounter EOS */
gst_bytestream_get_status (riff->bs, &remaining, &event);
- if (GST_IS_EVENT (event)) {
+ if (event && GST_IS_EVENT (event)) {
gboolean eos = (GST_EVENT_TYPE (event) == GST_EVENT_EOS);
gst_pad_event_default (riff->sinkpad, event);
guint32 remaining;
gst_bytestream_get_status (riff->bs, &remaining, &event);
- if (GST_IS_EVENT (event)) {
+ if (event && GST_IS_EVENT (event)) {
gst_pad_event_default (riff->sinkpad, event);
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
gst_bytestream_get_status (riff->bs, &remaining, &event);
if (event) {
g_warning ("Unexpected event before seek");
- gst_event_unref (event);
}
+
if (remaining)
gst_bytestream_flush_fast (riff->bs, remaining);
/* see if we have that much data available */
gst_bytestream_get_status (riff->bs, &remaining, &event);
- if (event) {
+ if (event && GST_IS_EVENT (event)) {
+ gboolean eos = (GST_EVENT_TYPE (event) == GST_EVENT_EOS);
+
g_warning ("Unexpected event in skip");
- gst_event_unref (event);
+ gst_pad_event_default (riff->sinkpad, event);
+ if (eos)
+ return FALSE;
}
/* yes */