From 3b92b225540c861131fad96730d4546460c2ede6 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 25 May 2018 14:44:16 +0200 Subject: [PATCH] omxvideo{enc,dec}: stop calling shutdown() in change_state This is no longer needed since we implemented close() vfuncs as the encoder/decoder base class already take care of calling close() (which is calling shutdown()) in its own change_state implementation. We also move the shut down of the component from PAUSED_TO_READY to READY_TO_NULL. By doing so upstream will have already deactivated the pool from the encoder and so won't be preventing the OMX state change as the buffers will all be released. https://bugzilla.gnome.org/show_bug.cgi?id=796918 --- omx/gstomxvideodec.c | 3 --- omx/gstomxvideoenc.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 70e01f6329..d2d6428755 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -512,9 +512,6 @@ gst_omx_video_dec_change_state (GstElement * element, GstStateChange transition) case GST_STATE_CHANGE_PAUSED_TO_READY: self->downstream_flow_ret = GST_FLOW_FLUSHING; self->started = FALSE; - - if (!gst_omx_video_dec_shutdown (self)) - ret = GST_STATE_CHANGE_FAILURE; break; case GST_STATE_CHANGE_READY_TO_NULL: break; diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index c92468e890..2e9498f1f8 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -1209,9 +1209,6 @@ gst_omx_video_enc_change_state (GstElement * element, GstStateChange transition) case GST_STATE_CHANGE_PAUSED_TO_READY: self->downstream_flow_ret = GST_FLOW_FLUSHING; self->started = FALSE; - - if (!gst_omx_video_enc_shutdown (self)) - ret = GST_STATE_CHANGE_FAILURE; break; case GST_STATE_CHANGE_READY_TO_NULL: break;