h265parse: don't invalidate the last PPS when parsing a new SPS

This is a port of https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2019
to h265parse.

When a SPS is received then any previous PPS remains valid. So don't clear
the PPS flag from the parser state.

This is important because there are encoders that don't generated a PPS after
every SPS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2217>
This commit is contained in:
Nirbheek Chauhan 2021-05-05 12:34:38 +05:30 committed by GStreamer Marge Bot
parent ad3d7d34cc
commit 4c4f031207

View file

@ -760,7 +760,7 @@ gst_h265_parse_process_nal (GstH265Parse * h265parse, GstH265NalUnit * nalu)
break;
case GST_H265_NAL_SPS:
/* reset state, everything else is obsolete */
h265parse->state = 0;
h265parse->state &= GST_H265_PARSE_STATE_GOT_PPS;
pres = gst_h265_parser_parse_sps (nalparser, nalu, &sps, TRUE);