Commit df08e333 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

video: Correct usage of the base class stream lock

And also renegotiate if the srcpad requires reconfiguration
parent 7b06c348
......@@ -2172,12 +2172,12 @@ gst_video_decoder_finish_frame (GstVideoDecoder * decoder,
GST_LOG_OBJECT (decoder, "finish frame %p", frame);
GST_VIDEO_DECODER_STREAM_LOCK (decoder);
if (G_UNLIKELY (priv->output_state_changed || (priv->output_state
&& gst_pad_check_reconfigure (decoder->srcpad))))
gst_video_decoder_negotiate (decoder);
GST_VIDEO_DECODER_STREAM_LOCK (decoder);
gst_video_decoder_prepare_finish_frame (decoder, frame, FALSE);
priv->processed++;
......@@ -2827,13 +2827,13 @@ gst_video_decoder_allocate_output_frame (GstVideoDecoder *
g_return_val_if_fail (num_bytes != 0, GST_FLOW_ERROR);
g_return_val_if_fail (frame->output_buffer == NULL, GST_FLOW_ERROR);
GST_VIDEO_DECODER_STREAM_LOCK (decoder);
if (G_UNLIKELY (decoder->priv->output_state_changed
|| (decoder->priv->output_state
&& gst_pad_check_reconfigure (decoder->srcpad))))
gst_video_decoder_negotiate (decoder);
GST_LOG_OBJECT (decoder, "alloc buffer size %d", num_bytes);
GST_VIDEO_DECODER_STREAM_LOCK (decoder);
flow_ret = gst_buffer_pool_acquire_buffer (decoder->priv->pool,
&frame->output_buffer, NULL);
......
......@@ -1507,9 +1507,11 @@ gst_video_encoder_finish_frame (GstVideoEncoder * encoder,
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
if (G_UNLIKELY (priv->output_state_changed))
if (G_UNLIKELY (priv->output_state_changed || (priv->output_state
&& gst_pad_check_reconfigure (encoder->srcpad))))
gst_video_encoder_set_src_caps (encoder);
if (G_UNLIKELY (priv->output_state == NULL))
goto no_output_state;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment