summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlessandro Decina <alessandro.d@gmail.com>2016-01-06 13:20:17 +1100
committerAlessandro Decina <alessandro.d@gmail.com>2016-01-06 13:20:17 +1100
commit85df5648bbc82c6810295d6f5c51fe37656807f1 (patch)
tree5d0b203da421a6a82f45e248a051ed9db01877e9 /sys
parente0d65937bc15c9a888e7c54d39c65c08dfb6884b (diff)
downloadgstreamer-plugins-bad-85df5648bbc82c6810295d6f5c51fe37656807f1.tar.gz
applemedia: avfvideosrc: small negotiation fix
Fix negotiation when GLMemory is requested but a context is not available
Diffstat (limited to 'sys')
-rw-r--r--sys/applemedia/avfvideosrc.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/applemedia/avfvideosrc.m b/sys/applemedia/avfvideosrc.m
index 6d3390d2c..ab6b836ea 100644
--- a/sys/applemedia/avfvideosrc.m
+++ b/sys/applemedia/avfvideosrc.m
@@ -1006,6 +1006,13 @@ caps_filter_out_gl_memory (GstCapsFeatures * features, GstStructure * structure,
else
gst_object_unref (context);
+ /* this can happen if video/x-raw(memory:GLMemory) is forced but a context is
+ * not available */
+ if (gst_caps_is_empty (new_caps)) {
+ GST_WARNING_OBJECT (element, "GLMemory requested but no context available");
+ return new_caps;
+ }
+
new_caps = gst_caps_truncate (new_caps);
structure = gst_caps_get_structure (new_caps, 0);
/* crank up to 11. This is what the presets do, but we don't use the presets