omxvideoenc: Set the state back to StateLoaded even if an error happened

This commit is contained in:
Sebastian Dröge 2011-08-10 09:56:30 +02:00
parent 9dcaf5c2bb
commit 8e422b7cc2

View file

@ -400,8 +400,7 @@ gst_omx_video_enc_close (GstOMXVideoEnc * self)
state = gst_omx_component_get_state (self->component, 0);
if (state > OMX_StateLoaded || state == OMX_StateInvalid) {
if (state > OMX_StateLoaded)
gst_omx_component_set_state (self->component, OMX_StateLoaded);
gst_omx_component_set_state (self->component, OMX_StateLoaded);
gst_omx_port_deallocate_buffers (self->in_port);
gst_omx_port_deallocate_buffers (self->out_port);
if (state > OMX_StateLoaded)