mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 19:42:26 +00:00
vaapidecode: lock stream when setting caps
This commit is contained in:
parent
ba49dc9dd7
commit
daed911caf
1 changed files with 4 additions and 1 deletions
|
@ -463,14 +463,17 @@ gst_vaapidecode_negotiate (GstVaapiDecode * decode)
|
|||
GstVideoDecoder *const vdec = GST_VIDEO_DECODER (decode);
|
||||
GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (vdec);
|
||||
|
||||
GST_DEBUG_OBJECT (decode, "Input codec state changed, doing renegotiation");
|
||||
GST_DEBUG_OBJECT (decode, "input codec state changed: renegotiating");
|
||||
|
||||
GST_VIDEO_DECODER_STREAM_LOCK (vdec);
|
||||
if (!gst_vaapi_plugin_base_set_caps (plugin, decode->sinkpad_caps, NULL))
|
||||
return FALSE;
|
||||
if (!gst_vaapidecode_update_src_caps (decode))
|
||||
return FALSE;
|
||||
if (!gst_vaapi_plugin_base_set_caps (plugin, NULL, decode->srcpad_caps))
|
||||
return FALSE;
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (vdec);
|
||||
|
||||
if (!gst_video_decoder_negotiate (vdec))
|
||||
return FALSE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue