[Pkg-gstreamer-commits] [gstreamer-vaapi] 128/176: vaapidecode: fix hang on SIGINT.
Vincent Cheng
vcheng at moszumanska.debian.org
Tue Jun 3 08:09:34 UTC 2014
This is an automated email from the git hooks/post-receive script.
vcheng pushed a commit to branch upstream
in repository gstreamer-vaapi.
commit d2f6274f31100e9a41dfc91a9064ee1a3c1b5e29
Author: Wind Yuan <feng.yuan at intel.com>
Date: Tue Dec 17 10:26:03 2013 +0800
vaapidecode: fix hang on SIGINT.
vaapidecode hangs when pipeline is stopped without any EOS, e.g. when
<Ctrl>+C is pressed, thus causing the srcpad task to keep running and
locked. This fixes a deadlock on state change from PAUSED to READY.
https://bugzilla.gnome.org/show_bug.cgi?id=720584
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
---
gst/vaapi/gstvaapidecode.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c
index f31ad78..8d4e475 100644
--- a/gst/vaapi/gstvaapidecode.c
+++ b/gst/vaapi/gstvaapidecode.c
@@ -769,6 +769,22 @@ gst_vaapidecode_parse(GstVideoDecoder *vdec,
return ret;
}
+static GstStateChangeReturn
+gst_vaapidecode_change_state (GstElement * element, GstStateChange transition)
+{
+ GstVaapiDecode * const decode = GST_VAAPIDECODE(element);
+
+ switch (transition) {
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
+ gst_pad_stop_task(GST_VAAPI_PLUGIN_BASE_SRC_PAD(decode));
+ break;
+ default:
+ break;
+ }
+ return GST_ELEMENT_CLASS(gst_vaapidecode_parent_class)->change_state(
+ element, transition);
+}
+
static void
gst_vaapidecode_class_init(GstVaapiDecodeClass *klass)
{
@@ -784,6 +800,9 @@ gst_vaapidecode_class_init(GstVaapiDecodeClass *klass)
object_class->finalize = gst_vaapidecode_finalize;
+ element_class->change_state =
+ GST_DEBUG_FUNCPTR(gst_vaapidecode_change_state);
+
vdec_class->open = GST_DEBUG_FUNCPTR(gst_vaapidecode_open);
vdec_class->close = GST_DEBUG_FUNCPTR(gst_vaapidecode_close);
vdec_class->set_format = GST_DEBUG_FUNCPTR(gst_vaapidecode_set_format);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gstreamer/gstreamer-vaapi.git
More information about the Pkg-gstreamer-commits
mailing list