From: Sebastian Dröge Date: Thu, 10 Nov 2011 14:01:36 +0000 (+0100) Subject: omxvideoenc: Fix minor race condition when draining after upstream signalled EOS X-Git-Tag: 1.0.0~265 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e56cff5f2ac4871fbe634bd96d8ea551328fe088;p=platform%2Fupstream%2Fgst-omx.git omxvideoenc: Fix minor race condition when draining after upstream signalled EOS --- diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index 59a68e0..2f9938e 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -838,7 +838,6 @@ gst_omx_video_enc_loop (GstOMXVideoEnc * self) gst_base_video_encoder_finish_frame (GST_BASE_VIDEO_ENCODER (self), frame); } - GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self); if ((flow_ret == GST_FLOW_OK && (buf->omx_buf->nFlags & OMX_BUFFERFLAG_EOS)) || flow_ret == GST_FLOW_UNEXPECTED) { @@ -863,6 +862,8 @@ gst_omx_video_enc_loop (GstOMXVideoEnc * self) if (flow_ret != GST_FLOW_OK) goto flow_error; + GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self); + return; component_error: @@ -904,6 +905,7 @@ flow_error: gst_pad_pause_task (GST_BASE_VIDEO_CODEC_SRC_PAD (self)); } self->started = FALSE; + GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (self); return; } reconfigure_error: