summaryrefslogtreecommitdiff
path: root/gst/vaapi/gstvaapidecode.c
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2015-08-29 00:27:05 +0300
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2015-09-09 17:17:07 +0200
commit14a27ecd857fc68f339416e549f6d4ec3bd644ba (patch)
tree97799725bf5b0126ef9e9103c514d233ff3512d9 /gst/vaapi/gstvaapidecode.c
parent8b7b163ab11e2c69c4d345cb6b0aa88d57ef8090 (diff)
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
Diffstat (limited to 'gst/vaapi/gstvaapidecode.c')
-rw-r--r--gst/vaapi/gstvaapidecode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c
index b3974898..db7e0de4 100644
--- a/gst/vaapi/gstvaapidecode.c
+++ b/gst/vaapi/gstvaapidecode.c
@@ -178,8 +178,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);
}