Search
SailfishOS Open Build Service
>
Projects
>
nemo
:
testing:hw
:
oneplus
:
oneplus3
>
gst-omx
> _service:tar_git:0013-omx-Fix-timeout-on-video-decoder-flush.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:0013-omx-Fix-timeout-on-video-decoder-flush.patch of Package gst-omx
From 176e646a9ab725dad93840bcb93de9ef8150802a Mon Sep 17 00:00:00 2001 From: Andrew Branson <andrew.branson@jollamobile.com> Date: Fri, 8 Dec 2017 10:17:23 +0100 Subject: [PATCH 13/14] [omx] Fix timeout on video decoder flush. Fixes JB#40521 Remove pausing, stopping and resuming from the video decoder flush operation. Our OMX components don't flush when paused, so this causes a timeout. --- omx/gstomxvideodec.c | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 25bb7f4..ed08719 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -2110,20 +2110,6 @@ gst_omx_video_dec_flush (GstVideoDecoder * decoder) if (gst_omx_component_get_state (self->dec, 0) == OMX_StateLoaded) return TRUE; - /* 0) Pause the components */ - if (gst_omx_component_get_state (self->dec, 0) == OMX_StateExecuting) { - gst_omx_component_set_state (self->dec, OMX_StatePause); - gst_omx_component_get_state (self->dec, GST_CLOCK_TIME_NONE); - } -#if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) - if (self->eglimage) { - if (gst_omx_component_get_state (self->egl_render, 0) == OMX_StateExecuting) { - gst_omx_component_set_state (self->egl_render, OMX_StatePause); - gst_omx_component_get_state (self->egl_render, GST_CLOCK_TIME_NONE); - } - } -#endif - /* 1) Flush the ports */ GST_DEBUG_OBJECT (self, "flushing ports"); gst_omx_port_set_flushing (self->dec_in_port, 5 * GST_SECOND, TRUE); @@ -2136,25 +2122,7 @@ gst_omx_video_dec_flush (GstVideoDecoder * decoder) } #endif - /* 2) Wait until the srcpad loop is stopped, - * unlock GST_VIDEO_DECODER_STREAM_LOCK to prevent deadlocks - * caused by using this lock from inside the loop function */ - GST_VIDEO_DECODER_STREAM_UNLOCK (self); - gst_pad_stop_task (GST_VIDEO_DECODER_SRC_PAD (decoder)); - GST_DEBUG_OBJECT (self, "Flushing -- task stopped"); - GST_VIDEO_DECODER_STREAM_LOCK (self); - - /* 3) Resume components */ - gst_omx_component_set_state (self->dec, OMX_StateExecuting); - gst_omx_component_get_state (self->dec, GST_CLOCK_TIME_NONE); -#if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) - if (self->eglimage) { - gst_omx_component_set_state (self->egl_render, OMX_StateExecuting); - gst_omx_component_get_state (self->egl_render, GST_CLOCK_TIME_NONE); - } -#endif - - /* 4) Unset flushing to allow ports to accept data again */ + /* 2) Unset flushing to allow ports to accept data again */ gst_omx_port_set_flushing (self->dec_in_port, 5 * GST_SECOND, FALSE); gst_omx_port_set_flushing (self->dec_out_port, 5 * GST_SECOND, FALSE); -- 2.14.1