GNOME Bugzilla – Bug 732542
h264parse: drop broken SEI NAL units/messages?
Last modified: 2018-05-05 14:59:55 UTC
Hi, the current implementation of gst_h264_parse_process_sei() will ignore any error from badly constructed SEI NAL unit. i.e. in alignment=au mode, we will be accumulating broken SEI NAL units. There are multiple (non-?) issues here: 1. If the SEI NAL unit contains a single SEI message that is incorrectly constructed, the process_sei() function would ignore it. It could be interesting to skip it from the output. 2. If the SEI NAL unit contains multiple SEI messages, and one of the SEI message is badly constructed, what should we do? Rejecting the whole NAL unit wouldn't be appropriate. However, would it be worth recreating a correct NAL unit with the good SEI messages? Otherwise, it could be just fine to delegate that to the decoder, and let it care, if needed. 3. In the codec parser, we try very hard to make the parser robust with invalid SEI messages. In particular, if the reported payloadSize is larger than what is left in the NAL unit, we would just skip the message, unless it is one of the supported set. Is it worth reporting an appropriate error? Thinking further, I think this bug is totally useless after all, and it might be just fine to ignore any SEI related error. :) That's supplemental information that does not interfere in the core decoding process. So, an error could be bearable.
As you said, it's not fundamental to the decoding process, I think it's safe to ignore.