codecparsers: h265: Broken code in parser is duplicated and fixed in the decoder class
We should fix the parser code and stop duplicating code in the H265 decoder. This code was copied from gstreamer-vaapi, which was doing so already.
The following discussion from !2414 (merged) should be addressed:
@ndufresne started a discussion: (+1 comment)
I notice also that gst_h265_decoder_prepare_rps() seems to duplicate what gst_h265_parser_parse_slice_hdr() is doing (wrongly, it forgot to reset the NumPicTotalCurr to zero as specified in the spec). The calculated values is needed in the parsing process, so it has to happen in the parser, duplicating it is just a bad friend, since we don't know how the parser may fail considering it has the wrong value.