mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-09 19:09:41 +00:00
vaapidecode: partially revert 0777f35
.
Reset the VA decoder after updating the base plugin caps, and most importantly, after GstVideoDecoder negotiation. The reason behind this is that the negotiation could trigger a last decide_allocation() where we could actually derive a new GstVaapiDisplay to use from the downstream element. e.g. GLX backend.
This commit is contained in:
parent
82e12a933e
commit
9b9878c96d
1 changed files with 3 additions and 2 deletions
|
@ -755,8 +755,6 @@ gst_vaapidecode_set_format(GstVideoDecoder *vdec, GstVideoCodecState *state)
|
|||
return FALSE;
|
||||
if (!gst_vaapi_plugin_base_set_caps(plugin, decode->sinkpad_caps, NULL))
|
||||
return FALSE;
|
||||
if (!gst_vaapidecode_reset_full(decode, decode->sinkpad_caps, FALSE))
|
||||
return FALSE;
|
||||
|
||||
if (gst_vaapidecode_update_src_caps(decode, state)) {
|
||||
if (!gst_video_decoder_negotiate(vdec))
|
||||
|
@ -764,6 +762,9 @@ gst_vaapidecode_set_format(GstVideoDecoder *vdec, GstVideoCodecState *state)
|
|||
if (!gst_vaapi_plugin_base_set_caps(plugin, NULL, decode->srcpad_caps))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!gst_vaapidecode_reset_full(decode, decode->sinkpad_caps, FALSE))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue