diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2010-10-13 12:51:00 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2010-10-13 14:54:23 +0100 |
commit | 59209b18915e28c0716375a157ca11cd146d9e1c (patch) | |
tree | bd3962c06f161ba19346ffde907113e293dd98d2 | |
parent | a09bd97bc6760b644a9d00006ecd558ee28e8fc2 (diff) |
buffer: add guard to buffer_set_caps() that checks if caps are simple
-rw-r--r-- | gst/gstbuffer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c index ecfe0330ed..a625345af9 100644 --- a/gst/gstbuffer.c +++ b/gst/gstbuffer.c @@ -485,9 +485,12 @@ void gst_buffer_set_caps (GstBuffer * buffer, GstCaps * caps) { g_return_if_fail (buffer != NULL); + g_return_if_fail (caps == NULL || GST_CAPS_IS_SIMPLE (caps)); + #if GST_VERSION_NANO == 1 /* we enable this extra debugging in git versions only for now */ g_warn_if_fail (gst_buffer_is_metadata_writable (buffer)); + /* FIXME: would be nice to also check if caps are fixed here, but expensive */ #endif gst_caps_replace (&GST_BUFFER_CAPS (buffer), caps); |