diff options
author | Julien Isorce <j.isorce@samsung.com> | 2015-06-19 11:57:06 +0100 |
---|---|---|
committer | Julien Isorce <j.isorce@samsung.com> | 2015-07-21 11:37:21 +0100 |
commit | 57f389d9ce2224a01511ce09f8c0957b25d4382a (patch) | |
tree | 7e11371f97207f55d08915f07db869525325200d /ext/gl | |
parent | 2fc017e822119da7fb83e1f6285e0869a7f07e39 (diff) | |
download | gstreamer-plugins-bad-57f389d9ce2224a01511ce09f8c0957b25d4382a.tar.gz |
gl: use gst_gl_display_create_context in more elements.
glbasefilter, glbasemixer and gltestsrc.
https://bugzilla.gnome.org/show_bug.cgi?id=750310
Diffstat (limited to 'ext/gl')
-rw-r--r-- | ext/gl/gstglbasemixer.c | 9 | ||||
-rw-r--r-- | ext/gl/gstgltestsrc.c | 8 |
2 files changed, 10 insertions, 7 deletions
diff --git a/ext/gl/gstglbasemixer.c b/ext/gl/gstglbasemixer.c index d462c161a..f8c8d193d 100644 --- a/ext/gl/gstglbasemixer.c +++ b/ext/gl/gstglbasemixer.c @@ -469,15 +469,16 @@ gst_gl_base_mixer_decide_allocation (GstGLBaseMixer * mix, GstQuery * query) if (!mix->context) { GST_OBJECT_LOCK (mix->display); do { - if (mix->context) + if (mix->context) { gst_object_unref (mix->context); + mix->context = NULL; + } /* just get a GL context. we don't care */ mix->context = gst_gl_display_get_gl_context_for_thread (mix->display, NULL); if (!mix->context) { - mix->context = gst_gl_context_new (mix->display); - if (!gst_gl_context_create (mix->context, mix->priv->other_context, - &error)) { + if (!gst_gl_display_create_context (mix->display, + mix->priv->other_context, &mix->context, &error)) { GST_OBJECT_UNLOCK (mix->display); goto context_error; } diff --git a/ext/gl/gstgltestsrc.c b/ext/gl/gstgltestsrc.c index 4dca6cbeb..877b09a05 100644 --- a/ext/gl/gstgltestsrc.c +++ b/ext/gl/gstgltestsrc.c @@ -779,14 +779,16 @@ gst_gl_test_src_decide_allocation (GstBaseSrc * basesrc, GstQuery * query) if (!src->context) { GST_OBJECT_LOCK (src->display); do { - if (src->context) + if (src->context) { gst_object_unref (src->context); + src->context = NULL; + } /* just get a GL context. we don't care */ src->context = gst_gl_display_get_gl_context_for_thread (src->display, NULL); if (!src->context) { - src->context = gst_gl_context_new (src->display); - if (!gst_gl_context_create (src->context, src->other_context, &error)) { + if (!gst_gl_display_create_context (src->display, src->other_context, + &src->context, &error)) { GST_OBJECT_UNLOCK (src->display); goto context_error; } |