GNOME Bugzilla – Bug 735078
gst_gl_handle_set_context may unref a NULL GstGLDisplay
Last modified: 2014-08-21 05:02:56 UTC
I found last commit changed gstglutils.c:770 gst_object_replace ((GstObject **) display, (GstObject *) replacement); to if (replacement) { GstGLDisplay *old = *display; *display = replacement; gst_object_unref (old); --> didn't consider NULL } should this check if old!=NULL first, or should this be if (replacement) { gst_object_replace ((GstObject **) display, (GstObject *) replacement); gst_object_unref(replacement); } ?
Good catch. Either will work, although I would go with the first option (checking old != NULL). Could you whip up a patch please?
Created attachment 284031 [details] [review] misc patch to fix the bug (In reply to comment #1) > Good catch. > > Either will work, although I would go with the first option (checking old != > NULL). > > Could you whip up a patch please? my pleasure, and this is the patch
commit 4c65eca7beab90b3fee4744af08b622e88303642 Author: Wang Xin-yu (王昕宇) <comicfans44@gmail.com> Date: Wed Aug 20 09:37:01 2014 +0800 gl: check null before unref GstGLDisplay and 1.4 commit dad05c201ea804225155f778ae5d15d912d4d249