mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
av1parse: let the parse continue when MISSING_OBU_REFERENCE error.
Some streams may have verbose OBUs before a valid sequence header. We should let the parse continue rather than return a error. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1634>
This commit is contained in:
parent
348658dd0a
commit
a7ca0b2079
1 changed files with 6 additions and 3 deletions
|
@ -1373,7 +1373,8 @@ gst_av1_parse_handle_obu_to_obu (GstBaseParse * parse,
|
||||||
|
|
||||||
g_assert (consumed <= map_info.size);
|
g_assert (consumed <= map_info.size);
|
||||||
|
|
||||||
if (res == GST_AV1_PARSER_BITSTREAM_ERROR) {
|
if (res == GST_AV1_PARSER_BITSTREAM_ERROR ||
|
||||||
|
res == GST_AV1_PARSER_MISSING_OBU_REFERENCE) {
|
||||||
if (consumed) {
|
if (consumed) {
|
||||||
*skipsize = consumed;
|
*skipsize = consumed;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1487,7 +1488,8 @@ again:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res == GST_AV1_PARSER_BITSTREAM_ERROR) {
|
if (res == GST_AV1_PARSER_BITSTREAM_ERROR ||
|
||||||
|
res == GST_AV1_PARSER_MISSING_OBU_REFERENCE) {
|
||||||
/* Discard the whole frame */
|
/* Discard the whole frame */
|
||||||
*skipsize = map_info.size;
|
*skipsize = map_info.size;
|
||||||
GST_WARNING_OBJECT (parse, "Parse obu error, discard %d", *skipsize);
|
GST_WARNING_OBJECT (parse, "Parse obu error, discard %d", *skipsize);
|
||||||
|
@ -1609,7 +1611,8 @@ again:
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res == GST_AV1_PARSER_BITSTREAM_ERROR) {
|
if (res == GST_AV1_PARSER_BITSTREAM_ERROR ||
|
||||||
|
res == GST_AV1_PARSER_MISSING_OBU_REFERENCE) {
|
||||||
*skipsize = map_info.size;
|
*skipsize = map_info.size;
|
||||||
GST_WARNING_OBJECT (parse, "Parse obu error, discard whole buffer %d.",
|
GST_WARNING_OBJECT (parse, "Parse obu error, discard whole buffer %d.",
|
||||||
*skipsize);
|
*skipsize);
|
||||||
|
|
Loading…
Reference in a new issue