vaapidecode: renegotiate if caps are not equal

The use of gst_caps_is_always_compatible() for this optimization may lead to
false positives. It is better to stick to gst_caps_is_strictly_equal() to know
if it is required a re-negotiation.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=750835
This commit is contained in:
Víctor Manuel Jáquez Leal 2015-08-29 00:27:05 +03:00 committed by Sreerenj Balachandran
parent 6eba201f32
commit 32d1c5adff

View file

@ -176,8 +176,13 @@ gst_vaapi_decode_input_state_replace (GstVaapiDecode * decode,
if (decode->input_state) {
if (new_state) {
const GstCaps *curcaps = decode->input_state->caps;
if (gst_caps_is_always_compatible (curcaps, new_state->caps))
/* If existing caps are equal of the new state, keep the
* existing state without renegotiating. */
if (gst_caps_is_strictly_equal (curcaps, new_state->caps)) {
GST_DEBUG ("Ignoring new caps %" GST_PTR_FORMAT
" since are equal to current ones", new_state->caps);
return FALSE;
}
}
gst_video_codec_state_unref (decode->input_state);
}