mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
codecparsers: av1: Fix a error report for metadata obu.
The metadata OBUs, for example, ITUT_T35 has an undefined payload such as itu_t_t35_payload_bytes field in AV1 spec, which may cause the failure of parsing the trailings bits. We can give a warning and ignore this kind of errors. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>
This commit is contained in:
parent
2c3a33eeab
commit
f20798a1db
1 changed files with 7 additions and 1 deletions
|
@ -1414,7 +1414,7 @@ gst_av1_parse_metadata_itut_t35 (GstAV1Parser * parser, GstBitReader * br,
|
||||||
if (ret != GST_AV1_PARSER_OK)
|
if (ret != GST_AV1_PARSER_OK)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (itut_t35->itu_t_t35_country_code) {
|
if (itut_t35->itu_t_t35_country_code == 0xFF) {
|
||||||
itut_t35->itu_t_t35_country_code_extention_byte =
|
itut_t35->itu_t_t35_country_code_extention_byte =
|
||||||
AV1_READ_BITS_CHECKED (br, 8, &ret);
|
AV1_READ_BITS_CHECKED (br, 8, &ret);
|
||||||
if (ret != GST_AV1_PARSER_OK)
|
if (ret != GST_AV1_PARSER_OK)
|
||||||
|
@ -1689,6 +1689,12 @@ gst_av1_parser_parse_metadata_obu (GstAV1Parser * parser, GstAV1OBU * obu,
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
retval = av1_skip_trailing_bits (parser, &bit_reader, obu);
|
retval = av1_skip_trailing_bits (parser, &bit_reader, obu);
|
||||||
|
if (retval != GST_AV1_PARSER_OK) {
|
||||||
|
GST_WARNING ("Metadata type %d may have wrong trailings.",
|
||||||
|
metadata->metadata_type);
|
||||||
|
retval = GST_AV1_PARSER_OK;
|
||||||
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
|
Loading…
Reference in a new issue