mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
vaapidecode: unlock stream if caps update fails
If caps update fail a dead lock occurs since the stream mutex is not unlocked.
This commit is contained in:
parent
bf2299279f
commit
6e65356017
1 changed files with 9 additions and 3 deletions
|
@ -472,17 +472,23 @@ gst_vaapidecode_negotiate (GstVaapiDecode * decode)
|
||||||
|
|
||||||
GST_VIDEO_DECODER_STREAM_LOCK (vdec);
|
GST_VIDEO_DECODER_STREAM_LOCK (vdec);
|
||||||
if (!gst_vaapi_plugin_base_set_caps (plugin, decode->sinkpad_caps, NULL))
|
if (!gst_vaapi_plugin_base_set_caps (plugin, decode->sinkpad_caps, NULL))
|
||||||
return FALSE;
|
goto caps_negotiation_failed;
|
||||||
if (!gst_vaapidecode_update_src_caps (decode))
|
if (!gst_vaapidecode_update_src_caps (decode))
|
||||||
return FALSE;
|
goto caps_negotiation_failed;
|
||||||
if (!gst_vaapi_plugin_base_set_caps (plugin, NULL, decode->srcpad_caps))
|
if (!gst_vaapi_plugin_base_set_caps (plugin, NULL, decode->srcpad_caps))
|
||||||
return FALSE;
|
goto caps_negotiation_failed;
|
||||||
GST_VIDEO_DECODER_STREAM_UNLOCK (vdec);
|
GST_VIDEO_DECODER_STREAM_UNLOCK (vdec);
|
||||||
|
|
||||||
if (!gst_video_decoder_negotiate (vdec))
|
if (!gst_video_decoder_negotiate (vdec))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
caps_negotiation_failed:
|
||||||
|
{
|
||||||
|
GST_VIDEO_DECODER_STREAM_UNLOCK (vdec);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue