diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2020-03-05 13:26:38 +0100 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2020-03-05 13:26:38 +0100 |
commit | 6e65356017d4f7fda37810daedf8f28b44943efb (patch) | |
tree | 8a6652533d2276216f20dbbadd9bae1dc4ede93c /gst | |
parent | bf2299279f61e3bb8ee952a971fd05b0bbd665a6 (diff) |
vaapidecode: unlock stream if caps update fails
If caps update fail a dead lock occurs since the stream mutex is not
unlocked.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/vaapi/gstvaapidecode.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index f8ef4ace..915cbab5 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -472,17 +472,23 @@ gst_vaapidecode_negotiate (GstVaapiDecode * decode) GST_VIDEO_DECODER_STREAM_LOCK (vdec); 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)) - return FALSE; + goto caps_negotiation_failed; if (!gst_vaapi_plugin_base_set_caps (plugin, NULL, decode->srcpad_caps)) - return FALSE; + goto caps_negotiation_failed; GST_VIDEO_DECODER_STREAM_UNLOCK (vdec); if (!gst_video_decoder_negotiate (vdec)) return FALSE; return TRUE; + +caps_negotiation_failed: + { + GST_VIDEO_DECODER_STREAM_UNLOCK (vdec); + return FALSE; + } } static gboolean |