summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2006-03-15 16:21:38 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2006-03-15 16:21:38 +0000
commit3a636c561fcb12bf51170c0a0ffeaddf5f4d157f (patch)
tree094c63d3d9cc768594168bf1f956f5fcddb5d3b1
parent50f4eb876a9d272847e22e3349309ce3f7ac42dc (diff)
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.
-rw-r--r--ChangeLog12
-rw-r--r--gst/apetag/gsttagdemux.c5
-rw-r--r--gst/id3demux/gstid3demux.c13
3 files changed, 26 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 926bf341..80e84f26 100644
--- a/ChangeLog
+++ b/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):
diff --git a/gst/apetag/gsttagdemux.c b/gst/apetag/gsttagdemux.c
index 53146604..b5d9cc32 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 a1ccfadd..6b7f073e 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;
}