diff --git a/ChangeLog b/ChangeLog index 926bf3412f..80e84f2694 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-03-15 Jan Schmidt + + * gst/apetag/gsttagdemux.c: (gst_tag_demux_chain): + Ensure that we set caps on the buffers we pass. + + * gst/id3demux/gstid3demux.c: (gst_id3demux_chain), + (gst_id3demux_sink_activate): + Ensure that we set caps on the buffers we pass. + + Use STREAM, TYPE_NOT_FOUND as the error class when + typefinding fails. + 2006-03-15 Edward Hervey * ext/cairo/gsttextoverlay.c: (gst_text_overlay_init): diff --git a/gst/apetag/gsttagdemux.c b/gst/apetag/gsttagdemux.c index 5314660406..b5d9cc3217 100644 --- a/gst/apetag/gsttagdemux.c +++ b/gst/apetag/gsttagdemux.c @@ -610,6 +610,11 @@ gst_tag_demux_chain (GstPad * pad, GstBuffer * buf) GST_DEBUG_OBJECT (demux, "Pushing buffer %p", outbuf); /* gst_util_dump_mem (GST_BUFFER_DATA (outbuf), GST_BUFFER_SIZE (outbuf)); */ + + /* Ensure the caps are set correctly */ + outbuf = gst_buffer_make_metadata_writable (outbuf); + gst_buffer_set_caps (outbuf, GST_PAD_CAPS (demux->priv->srcpad)); + return gst_pad_push (demux->priv->srcpad, outbuf); } } diff --git a/gst/id3demux/gstid3demux.c b/gst/id3demux/gstid3demux.c index a1ccfadd99..6b7f073ebe 100644 --- a/gst/id3demux/gstid3demux.c +++ b/gst/id3demux/gstid3demux.c @@ -453,9 +453,9 @@ gst_id3demux_chain (GstPad * pad, GstBuffer * buf) } /* We failed typefind */ - GST_ELEMENT_ERROR (id3demux, CORE, CAPS, + GST_ELEMENT_ERROR (id3demux, STREAM, TYPE_NOT_FOUND, ("Could not determine the mime type of the file"), - ("No caps found for contents within an ID3 tag")); + ("Could not detect type for contents within an ID3 tag")); gst_buffer_unref (typefind_buf); gst_buffer_unref (id3demux->collect); id3demux->collect = NULL; @@ -510,6 +510,11 @@ gst_id3demux_chain (GstPad * pad, GstBuffer * buf) } GST_DEBUG_OBJECT (id3demux, "Pushing buffer %p", outbuf); + + /* Ensure the caps are set correctly */ + outbuf = gst_buffer_make_metadata_writable (outbuf); + gst_buffer_set_caps (outbuf, GST_PAD_CAPS (id3demux->srcpad)); + return gst_pad_push (id3demux->srcpad, outbuf); } } @@ -842,9 +847,9 @@ gst_id3demux_sink_activate (GstPad * sinkpad) /* 5 - If we didn't find the caps, fail */ if (caps == NULL) { - GST_ELEMENT_ERROR (id3demux, CORE, CAPS, + GST_ELEMENT_ERROR (id3demux, STREAM, TYPE_NOT_FOUND, ("Could not determine the mime type of the file"), - ("No caps found for contents within an ID3 tag")); + ("Could not detect type for contents within an ID3 tag")); goto done_activate; }