omxvideo{enc,dec}: stop calling shutdown() in change_state
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 25 May 2018 12:44:16 +0000 (14:44 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 30 Aug 2018 08:59:30 +0000 (10:59 +0200)
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
omx/gstomxvideoenc.c

index 70e01f6..d2d6428 100644 (file)
@@ -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;
index c92468e..2e9498f 100644 (file)
@@ -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;