diff options
author | Benjamin Otte <otte@redhat.com> | 2010-04-17 02:16:31 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-04-17 02:16:31 +0200 |
commit | 10b92dc7b32172ae82d615443871681ecedced2c (patch) | |
tree | f7dfea044747db1b8b2d527940fe64730ddde3de | |
parent | e937c10213d6d42de2dec409e7233f01007e63f3 (diff) |
Add code to negotiation code that checks for empty caps
In that case, fail with NOT_NEGOTIATED
-rw-r--r-- | gst-libs/gst/cairo/gstcairopad.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gst-libs/gst/cairo/gstcairopad.c b/gst-libs/gst/cairo/gstcairopad.c index 5726a14..388c9b6 100644 --- a/gst-libs/gst/cairo/gstcairopad.c +++ b/gst-libs/gst/cairo/gstcairopad.c @@ -117,9 +117,14 @@ gst_cairo_pad_alloc_buffer_full (GstPad * pad, } else { caps = gst_pad_get_allowed_caps (pad); - if (caps && restrict_func) + if (caps && !gst_caps_is_empty (caps) && restrict_func) caps = restrict_func (caps, restrict_data); + if (gst_caps_is_empty (caps)) { + gst_caps_unref (caps); + return GST_FLOW_NOT_NEGOTIATED; + } + if (caps == NULL) return GST_FLOW_NOT_NEGOTIATED; |