event: only allow fixed caps in caps event

This commit is contained in:
Wim Taymans 2011-05-06 15:51:11 +02:00
parent 903dadef17
commit 3122f429cd

View file

@ -492,6 +492,8 @@ gst_event_new_caps (GstCaps * caps)
{
GstEvent *event;
g_return_val_if_fail (caps != NULL && gst_caps_is_fixed (caps), NULL);
GST_CAT_INFO (GST_CAT_EVENT, "creating caps event %" GST_PTR_FORMAT, caps);
event = gst_event_new_custom (GST_EVENT_CAPS,
@ -506,7 +508,8 @@ gst_event_new_caps (GstCaps * caps)
* @event: The event to parse
* @caps: (out): A pointer to the caps
*
* Get the caps from @event.
* Get the caps from @event. The caps remains valid as long as @event remains
* valid.
*/
void
gst_event_parse_caps (GstEvent * event, GstCaps ** caps)