mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
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:
parent
6eba201f32
commit
32d1c5adff
1 changed files with 6 additions and 1 deletions
|
@ -176,9 +176,14 @@ 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue