summaryrefslogtreecommitdiffstats
path: root/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2016-08-17 15:02:23 -0500
committerPatrick Williams <patrick@stwcx.xyz>2016-08-22 16:43:34 +0000
commit8b8bc41cac34759602dc7668df9edb038839b238 (patch)
treecb5bafb877a39832d5f27534dbf796567d9d78bc /import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
parentb48b7b4109868a8c0ddda090992e936e821c7ea6 (diff)
downloadtalos-openbmc-8b8bc41cac34759602dc7668df9edb038839b238.tar.gz
talos-openbmc-8b8bc41cac34759602dc7668df9edb038839b238.zip
Squashed 'import-layers/meta-raspberrypi/' content from commit 2745399
Change-Id: I8a89d81813dea98209d089ef500a403ea4da5d9d git-subtree-dir: import-layers/meta-raspberrypi git-subtree-split: 2745399f75d7564fcc586d0365ff73be47849d0e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch')
-rw-r--r--import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
new file mode 100644
index 000000000..815a7c2b6
--- /dev/null
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.2.0/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
@@ -0,0 +1,48 @@
+From 2e111e52f96f0b942abda120c30a876629bd73fc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
+Date: Mon, 25 May 2015 14:53:35 +0200
+Subject: [PATCH] Don't try to acquire buffer when src pad isn't active
+
+This solves a race condition when setting the pipeline from PAUSE to
+NULL while the decoder loop is still running. Without this patch, the
+thread which interacts with the decode sink pad gets blocked here:
+
+ gst_element_change_state()
+ gst_element_change_state_func()
+ gst_element_pads_activate() --> Deactivating pads
+ activate_pads()
+ gst_pad_set_active()
+ gst_pad_activate_mode()
+ post_activate()
+ GST_PAD_STREAM_LOCK()
+
+while gst_omx_port_acquire_buffer() gets stalled forever in
+gst_omx_component_wait_message() waiting for a message that will never
+arrive:
+
+ gst_omx_video_dec_loop()
+ gst_omx_port_acquire_buffer()
+ gst_omx_component_wait_message()
+---
+ omx/gstomxvideodec.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
+index cd24944..57a61dd 100644
+--- a/omx/gstomxvideodec.c
++++ b/omx/gstomxvideodec.c
+@@ -1247,6 +1247,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
+ GstClockTimeDiff deadline;
+ OMX_ERRORTYPE err;
+
++ if (!gst_pad_is_active(GST_VIDEO_DECODER_SRC_PAD (self))) {
++ GST_DEBUG_OBJECT (self, "Src pad not active, not acquiring buffer and flushing instead");
++ goto flushing;
++ }
++
+ #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
+ port = self->eglimage ? self->egl_out_port : self->dec_out_port;
+ #else
+--
+1.8.3.2
+
OpenPOWER on IntegriCloud