GNOME Bugzilla – Bug 741893
inputselector: Get the active sinkpad again after taking the lock when handling events
Last modified: 2014-12-23 11:59:54 UTC
I found below patch remove one line one latest code. But the line is critical and can't removed. We should keep get the active sink pad in lock as change active sink pad also work in lock. Attached patch to fix the issue. commit 82850026934b3c89465ac8d02e671d6268ba1586 Author: Stefan Sauer <ensonic@users.sf.net> Date: Fri Oct 3 14:01:59 2014 +0200 input-selector: small code cleanups Rename TIMESTAMP -> PTS. Move a var down to the scope where it is used. Use g_queue_free_full(). @@ -470,7 +465,6 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event) gst_object_unref (prev_active_sinkpad); GST_INPUT_SELECTOR_LOCK (sel); - active_sinkpad = gst_input_selector_activate_sinkpad (sel, pad); /* only forward if we are dealing with the active sinkpad */ forward = (pad == active_sinkpad);
Created attachment 293221 [details] [review] patch to fix the issue.
Thanks for the patch, but please attach patches in "git format-patch" format :) commit 12a905929f239eb8fe111527d2244d19c6a97efa Author: Sebastian Dröge <sebastian@centricular.com> Date: Tue Dec 23 12:54:50 2014 +0100 inputselector: Keep a ref of the currently active sinkpad around Otherwise we can't be sure that the pointer points to a still existing pad instance after releasing the lock. commit 3137043c3a63748a882409dd75ab9706b7f3b09c Author: Song Bing <b06498@freescale.com> Date: Tue Dec 23 12:53:58 2014 +0100 inputselector: Get the active sinkpad again after taking the lock when handling events It might have changed in the meantime. https://bugzilla.gnome.org/show_bug.cgi?id=741893