From 3122f429cd26043ca760520396119d99110119c9 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 6 May 2011 15:51:11 +0200 Subject: [PATCH] event: only allow fixed caps in caps event --- gst/gstevent.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/gstevent.c b/gst/gstevent.c index 9e4390c..ca705d1 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -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) -- 2.7.4