mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
gst/apetag/gsttagdemux.c: Ensure that we set caps on the buffers we pass.
Original commit message from CVS: * 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.
This commit is contained in:
parent
50f4eb876a
commit
3a636c561f
3 changed files with 26 additions and 4 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2006-03-15 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* 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 <edward@fluendo.com>
|
||||
|
||||
* ext/cairo/gsttextoverlay.c: (gst_text_overlay_init):
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue