mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
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
This commit is contained in:
parent
9875c0d84e
commit
2eb2b26ad8
1 changed files with 7 additions and 6 deletions
|
@ -1182,10 +1182,8 @@ gst_vaapi_decoder_update_caps (GstVaapiDecoder * decoder, GstCaps * caps)
|
||||||
if (!decoder_caps)
|
if (!decoder_caps)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (gst_caps_is_always_compatible (caps, decoder_caps)) {
|
if (gst_caps_is_always_compatible (caps, decoder_caps))
|
||||||
set_caps (decoder, caps);
|
return set_caps (decoder, caps);
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
profile = gst_vaapi_profile_from_caps (caps);
|
profile = gst_vaapi_profile_from_caps (caps);
|
||||||
if (profile == GST_VAAPI_PROFILE_UNKNOWN)
|
if (profile == GST_VAAPI_PROFILE_UNKNOWN)
|
||||||
|
@ -1194,8 +1192,11 @@ gst_vaapi_decoder_update_caps (GstVaapiDecoder * decoder, GstCaps * caps)
|
||||||
if (codec == 0)
|
if (codec == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (codec == decoder->codec) {
|
if (codec == decoder->codec) {
|
||||||
set_caps (decoder, caps);
|
if (set_caps (decoder, caps)) {
|
||||||
return TRUE;
|
return
|
||||||
|
gst_vaapi_decoder_decode_codec_data (decoder) ==
|
||||||
|
GST_VAAPI_DECODER_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue