vaapidecode: Check the condition after taking the lock
authorOlivier Crete <olivier.crete@collabora.com>
Wed, 4 Feb 2015 16:34:59 +0000 (18:34 +0200)
committerSreerenj Balachandran <sreerenj.balachandran@intel.com>
Wed, 4 Feb 2015 16:34:59 +0000 (18:34 +0200)
commitfc7e6b19fd8f8b2bf4be2a69099482e051c14f2b
treeed97a838e187d80ef5de22f3a8c25532a11b7d32
parentd2e2784a78d1ed445a0f60fc2c4e7c3a18f38498
vaapidecode: Check the condition after taking the lock

Otherwise the condition could become true before the lock
is taken and the g_cond_signal() could be called
before the g_cond_wait(), so the g_cond_wait() is never
awoken.

https://bugzilla.gnome.org/show_bug.cgi?id=740645
gst-libs/gst/vaapi/gstvaapidecoder.h
gst-libs/gst/vaapi/gstvaapidecoder_priv.h
gst/vaapi/gstvaapidecode.c