summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2019-05-28 18:05:19 +0100
committerAndrei Gherzan <andrei@gherzan.ro>2019-05-28 18:13:13 +0100
commit84d15f4d31cda25050a198bd48222c370613ae23 (patch)
treeb7f2543c829a3b3648c098e6cb579673389f8e81 /recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
parent7059c374512f1c1c0df9ecab0703d11438bdf78b (diff)
downloadmeta-raspberrypi-ag/gstomx.tar.gz
gstreamer1.0-omx: Forward port bbappend and patches to v1.16.xag/gstomx
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Diffstat (limited to 'recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch')
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
new file mode 100644
index 0000000..c8af7da
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
@@ -0,0 +1,48 @@
1From 160181edf5fc73288abfe99fa04de4a550cd9c65 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 11 Feb 2016 12:53:20 -0800
4Subject: [PATCH] Don't try to acquire buffer when src pad isn't active
5
6From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
7
8This solves a race condition when setting the pipeline from PAUSE to
9NULL while the decoder loop is still running. Without this patch, the
10thread which interacts with the decode sink pad gets blocked here:
11
12 gst_element_change_state()
13 gst_element_change_state_func()
14 gst_element_pads_activate() --> Deactivating pads
15 activate_pads()
16 gst_pad_set_active()
17 gst_pad_activate_mode()
18 post_activate()
19 GST_PAD_STREAM_LOCK()
20
21while gst_omx_port_acquire_buffer() gets stalled forever in
22gst_omx_component_wait_message() waiting for a message that will never
23arrive:
24
25 gst_omx_video_dec_loop()
26 gst_omx_port_acquire_buffer()
27 gst_omx_component_wait_message()
28
29---
30 omx/gstomxvideodec.c | 5 +++++
31 1 file changed, 5 insertions(+)
32
33diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
34index abe6e30..c4dc33f 100644
35--- a/omx/gstomxvideodec.c
36+++ b/omx/gstomxvideodec.c
37@@ -1598,6 +1598,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
38 GstOMXAcquireBufferReturn acq_return;
39 OMX_ERRORTYPE err;
40
41+ if (!gst_pad_is_active(GST_VIDEO_DECODER_SRC_PAD (self))) {
42+ GST_DEBUG_OBJECT (self, "Src pad not active, not acquiring buffer and flushing instead");
43+ goto flushing;
44+ }
45+
46 #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
47 port = self->eglimage ? self->egl_out_port : self->dec_out_port;
48 #else