diff --git a/ChangeLog b/ChangeLog index ed2a8b162d..116ebcc557 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2005-01-19 Ronald S. Bultje + + * gst-libs/gst/riff/riff-read.c: (gst_riff_peek_element_data), + (gst_riff_read_element_data): + * gst-libs/gst/riff/riff-read.h: + Add _peek version (req'ed in CDXA). + * gst/cdxaparse/gstcdxaparse.c: (gst_cdxaparse_init), + (gst_cdxaparse_loop): + Fix parsing in playbin. + * gst/playback/gstdecodebin.c: (close_pad_link): + Ignore current_ pads, they cause major annoyance. + 2005-01-19 Ronald S. Bultje * ext/alsa/gstalsasink.c: (gst_alsa_sink_loop): diff --git a/gst-libs/gst/riff/riff-read.c b/gst-libs/gst/riff/riff-read.c index 4d379a7bc9..fbbbae26a6 100644 --- a/gst-libs/gst/riff/riff-read.c +++ b/gst-libs/gst/riff/riff-read.c @@ -260,7 +260,7 @@ gst_riff_peek_head (GstRiffRead * riff, */ GstBuffer * -gst_riff_read_element_data (GstRiffRead * riff, guint length, guint * got_bytes) +gst_riff_peek_element_data (GstRiffRead * riff, guint length, guint * got_bytes) { GstBuffer *buf = NULL; guint32 got; @@ -272,14 +272,28 @@ gst_riff_read_element_data (GstRiffRead * riff, guint length, guint * got_bytes) return NULL; } + if (got_bytes) + *got_bytes = got; + + return buf; +} + +GstBuffer * +gst_riff_read_element_data (GstRiffRead * riff, guint length, guint * got_bytes) +{ + GstBuffer *buf; + + if (!(buf = gst_riff_peek_element_data (riff, length, got_bytes))) + return NULL; + /* we need 16-bit alignment */ if (length & 1) length++; - gst_bytestream_flush (riff->bs, length); - - if (got_bytes) - *got_bytes = got; + if (!gst_bytestream_flush (riff->bs, length)) { + gst_buffer_unref (buf); + return NULL; + } return buf; } diff --git a/gst-libs/gst/riff/riff-read.h b/gst-libs/gst/riff/riff-read.h index d44c4ed7e8..a0c1260601 100644 --- a/gst-libs/gst/riff/riff-read.h +++ b/gst-libs/gst/riff/riff-read.h @@ -85,6 +85,9 @@ gboolean gst_riff_read_header (GstRiffRead *read, GstBuffer *gst_riff_read_element_data (GstRiffRead *riff, guint length, guint *got_bytes); +GstBuffer *gst_riff_peek_element_data (GstRiffRead *riff, + guint length, + guint *got_bytes); /* * Utility functions (including byteswapping). */ diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index 6549c3bb56..5536a55950 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -397,6 +397,9 @@ close_pad_link (GstElement * element, GstPad * pad, GstCaps * caps, GstStructure *structure; const gchar *mimetype; + if (!strncmp (gst_pad_get_name (pad), "current_", 8)) + return; + /* the caps is empty, this means the pad has no type, we can only * decide to fire the unknown_type signal. */ if (caps == NULL || gst_caps_is_empty (caps)) {