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>
if (ret != GST_AV1_PARSER_OK)
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 =
AV1_READ_BITS_CHECKED (br, 8, &ret);
if (ret != GST_AV1_PARSER_OK)
goto error;
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;
error: