mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
videoparsers: h265: Be less restrictive between PPS and SPS parsing order
Allow to parse PPS to be parser even if SPS hasn't been parsered before. This help to parse VPSSPSPPS_A_MainConcept_1 conformance test Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575>
This commit is contained in:
parent
5ae05bb42a
commit
a275e1e029
1 changed files with 1 additions and 15 deletions
|
@ -797,14 +797,8 @@ gst_h265_parse_process_nal (GstH265Parse * h265parse, GstH265NalUnit * nalu)
|
|||
h265parse->state |= GST_H265_PARSE_STATE_GOT_SPS;
|
||||
break;
|
||||
case GST_H265_NAL_PPS:
|
||||
/* expected state: got-sps */
|
||||
h265parse->state &= GST_H265_PARSE_STATE_GOT_SPS;
|
||||
if (!GST_H265_PARSE_STATE_VALID (h265parse, GST_H265_PARSE_STATE_GOT_SPS))
|
||||
return FALSE;
|
||||
|
||||
pres = gst_h265_parser_parse_pps (nalparser, nalu, &pps);
|
||||
|
||||
|
||||
/* arranged for a fallback pps.id, so use that one and only warn */
|
||||
if (pres != GST_H265_PARSER_OK) {
|
||||
GST_WARNING_OBJECT (h265parse, "failed to parse PPS:");
|
||||
|
@ -960,16 +954,8 @@ gst_h265_parse_process_nal (GstH265Parse * h265parse, GstH265NalUnit * nalu)
|
|||
break;
|
||||
}
|
||||
case GST_H265_NAL_AUD:
|
||||
/* Just accumulate AU Delimiter, whether it's before SPS or not */
|
||||
pres = gst_h265_parser_parse_nal (nalparser, nalu);
|
||||
if (pres != GST_H265_PARSER_OK)
|
||||
return FALSE;
|
||||
break;
|
||||
default:
|
||||
/* drop anything before the initial SPS */
|
||||
if (!GST_H265_PARSE_STATE_VALID (h265parse, GST_H265_PARSE_STATE_GOT_SPS))
|
||||
return FALSE;
|
||||
|
||||
/* Just accumulate AU Delimiter, whether it's before SPS or not */
|
||||
pres = gst_h265_parser_parse_nal (nalparser, nalu);
|
||||
if (pres != GST_H265_PARSER_OK)
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue