summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <ystreet00@gmail.com>2014-05-07 09:11:25 +1000
committerMatthew Waters <ystreet00@gmail.com>2014-05-07 09:12:23 +1000
commit6f4fd7086745720c39cc1d6bfd7a1c4c845caf99 (patch)
tree5c56e7f9344ca5d937c77cb8a7b4d82a6f80b5a0
parent7dfd308e8c56a8ac586d78e894b1ea9476e835ff (diff)
gl/sink: make sure we always initialize the upload object
https://bugzilla.gnome.org/show_bug.cgi?id=729542
-rw-r--r--ext/gl/gstglimagesink.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c
index 7b3d17146..1cd5c5eaa 100644
--- a/ext/gl/gstglimagesink.c
+++ b/ext/gl/gstglimagesink.c
@@ -687,9 +687,21 @@ gst_glimage_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
gst_object_unref (oldpool);
}
+ if (glimage_sink->upload)
+ gst_object_unref (glimage_sink->upload);
glimage_sink->upload = gst_object_ref (GST_GL_BUFFER_POOL (newpool)->upload);
+ if (!gst_gl_upload_init_format (glimage_sink->upload, &vinfo))
+ goto upload_error;
+
return TRUE;
+
+upload_error:
+ {
+ GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
+ ("%s", "Failed to initialize upload resources"), (NULL));
+ return FALSE;
+ }
}
static GstFlowReturn