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:
Gwenole Beauchesne 2015-01-22 22:45:24 +01:00
parent 82e12a933e
commit 9b9878c96d

View file

@ -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;
}