[REGRESSION] openh264enc: Produce broken SPS since 17113695
I don't have an exact break point, but since I updated to Fedora 34, I notice that openh264enc does not work anymore, OpenH264 version is 2.1.1. To test this:
GST_DEBUG=2 gst-launch-1.0 videotestsrc ! openh264enc ! h264parse ! fakesink
Will report:
0:00:00.941873944 170182 0x25a5120 WARN codecparsers_h264 gsth264parser.c:1691:gst_h264_parse_sps_data: failed to read UE for 'tmp'
0:00:00.941878052 170182 0x25a5120 WARN codecparsers_h264 gsth264parser.c:1934:gst_h264_parse_sps: error parsing "Sequence parameter set"
0:00:00.941881038 170182 0x25a5120 WARN h264parse gsth264parse.c:966:gst_h264_parse_process_nal:<h264parse0> failed to parse SPS:
0:00:00.941885396 170182 0x25a5120 WARN h264parse gsth264parse.c:1494:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 7 SPS, Size: 4 will be dropped
In practice the parser failed reading profile_idc (the very first value of the SPS). I also tested with ffmpeg:
avdec_h264-0> Failed to send data for decoding
0:00:00.661950779 170246 0x7f0e88004ad0 ERROR libav :0:: sps_id 32 out of range
0:00:00.661985524 170246 0x7f0e88004ad0 ERROR libav :0:: sps_id 32 out of range
0:00:00.662000182 170246 0x7f0e88004ad0 ERROR libav :0:: sps_id 32 out of range
0:00:00.662009509 170246 0x7f0e88004ad0 ERROR libav :0:: no frame!
0:00:00.665531404 170246 0xe0e860 WARN libav gstavviddec.c:2018:gst_ffmpegviddec_handle_frame:<avdec_h264-0> Failed to send data for decoding
This is very similar to what h264parse fails on, so I don't suspect a parser bug here. What I suspect is an ABI break, do a simple rebuild does not seems to fix it either here (tested 1.18.4 and master).
Edited by Nicolas Dufresne