[Bug 763168] gldisplay: _get_gl_context_for_thread_unlocked looks suspicious

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun Mar 6 10:30:42 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=763168

Matthew Waters (ystreet00) <ystreet00 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #323187|none                        |needs-work
             status|                            |

--- Comment #1 from Matthew Waters (ystreet00) <ystreet00 at gmail.com> ---
Review of attachment 323187:
 --> (https://bugzilla.gnome.org/review?bug=763168&attachment=323187)

Still not quite right.

::: gst-libs/gst/gl/gstgldisplay.c
@@ +440,2 @@
     context_thread = gst_gl_context_get_thread (context);
+    if (thread != NULL && thread != context_thread) {

Both before and after these changes aren't quite correct.

Before is definitely wrong.
After, if thread and all context_thread's are all NULL, then no context will be
returned.

This should probably be something like this instead:

if (thread == NULL)
return context;

context_thread = gst_gl_context_get_thread (context);
if (thread != context_thread) {
...

Or invert the (thread != context_thread) and switch the continue/later return
code paths

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list