summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-08-24 21:51:22 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-09-25 13:11:06 +0200
commit9cf26c81a17a71c4ededd944d2668b576a4e404b (patch)
treee6a71dc484989b22ad4a4d74f6f2c095cfb7a2c8
parent8d2884ec349ba8e402e9251c6e96b2e1ff23da69 (diff)
libs: decoder: at update_caps() decode codec_data
When updating the caps in decoder, if the caps has codec_data (avC format), it has to be parsed to update the state of the decoder. https://bugzilla.gnome.org/show_bug.cgi?id=786173
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.c b/gst-libs/gst/vaapi/gstvaapidecoder.c
index ce9c065b..9e716db2 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder.c
@@ -1182,10 +1182,8 @@ gst_vaapi_decoder_update_caps (GstVaapiDecoder * decoder, GstCaps * caps)
if (!decoder_caps)
return FALSE;
- if (gst_caps_is_always_compatible (caps, decoder_caps)) {
- set_caps (decoder, caps);
- return TRUE;
- }
+ if (gst_caps_is_always_compatible (caps, decoder_caps))
+ return set_caps (decoder, caps);
profile = gst_vaapi_profile_from_caps (caps);
if (profile == GST_VAAPI_PROFILE_UNKNOWN)
@@ -1194,8 +1192,11 @@ gst_vaapi_decoder_update_caps (GstVaapiDecoder * decoder, GstCaps * caps)
if (codec == 0)
return FALSE;
if (codec == decoder->codec) {
- set_caps (decoder, caps);
- return TRUE;
+ if (set_caps (decoder, caps)) {
+ return
+ gst_vaapi_decoder_decode_codec_data (decoder) ==
+ GST_VAAPI_DECODER_STATUS_SUCCESS;
+ }
}
return FALSE;