From: Sebastian Dröge Date: Mon, 23 Jul 2012 10:06:16 +0000 (+0200) Subject: videoencoder: Hold the stream lock when reconfiguring the element X-Git-Tag: 1.19.3~511^2~6146 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fcf5e389ce3543b6304790655e678985bfd48662;p=platform%2Fupstream%2Fgstreamer.git videoencoder: Hold the stream lock when reconfiguring the element --- diff --git a/gst-libs/gst/video/gstvideoencoder.c b/gst-libs/gst/video/gstvideoencoder.c index 4090cc6..bd6cdeb 100644 --- a/gst-libs/gst/video/gstvideoencoder.c +++ b/gst-libs/gst/video/gstvideoencoder.c @@ -1455,13 +1455,13 @@ gst_video_encoder_allocate_output_frame (GstVideoEncoder * g_return_val_if_fail (frame->output_buffer == NULL, GST_FLOW_ERROR); g_return_val_if_fail (size > 0, GST_FLOW_ERROR); + GST_VIDEO_ENCODER_STREAM_LOCK (encoder); if (G_UNLIKELY (encoder->priv->output_state_changed || (encoder->priv->output_state && gst_pad_check_reconfigure (encoder->srcpad)))) gst_video_encoder_set_src_caps (encoder); GST_LOG_OBJECT (encoder, "alloc buffer size %d", size); - GST_VIDEO_ENCODER_STREAM_LOCK (encoder); frame->output_buffer = gst_buffer_new_allocate (encoder->priv->allocator, size,