+2004-08-27 Arwed v. Merkatz <v.merkatz@gmx.net>
+
+ * gst/matroska/ebml-read.c: (gst_ebml_peed_id), (gst_ebml_read_element_id),
+ handle EOS correctly
+
2004-08-27 Thomas Vander Stichele <thomas at apestaart dot org>
patch by: Zaheer Abbas Merali
/* Here, we might encounter EOS */
gst_bytestream_get_status (ebml->bs, &remaining, &event);
- if (event) {
+ if (event && GST_IS_EVENT (event)) {
+ gboolean eos = (GST_EVENT_TYPE (event) == GST_EVENT_EOS);
+
gst_pad_event_default (ebml->sinkpad, event);
+ if (eos)
+ return FALSE;
} else {
guint64 pos = gst_bytestream_tell (ebml->bs);
g_assert (level_up);
- if (gst_ebml_read_element_id (ebml, &id, level_up) < 0)
+ if (gst_ebml_read_element_id (ebml, &id, level_up) <= 0)
return 0;
return id;