[FFmpeg-devel] [PATCH 13/18] h264_sei: parse the picture timing SEIs correctly

James Almer jamrial at gmail.com
Sun Mar 22 00:48:20 EET 2020


On 3/21/2020 7:44 PM, Michael Niedermayer wrote:
> On Tue, Mar 17, 2020 at 01:13:53AM +0100, Michael Niedermayer wrote:
>> On Mon, Mar 16, 2020 at 04:42:31PM -0300, James Almer wrote:
>>> On 3/16/2020 3:51 PM, Michael Niedermayer wrote:
>>>> On Fri, Mar 13, 2020 at 11:28:45AM +0100, Anton Khirnov wrote:
>>>>> Those SEIs refer to the currently active SPS. However, since the SEI
>>>>> NALUs precede the coded picture data in the bitstream, the active SPS is
>>>>> in general not known when we are decoding the SEI.
>>>>>
>>>>> Therefore, store the content of the picture timing SEIs and actually
>>>>> parse it when the active SPS is known.
>>>>> ---
>>>>>  libavcodec/h264_parser.c |  9 +++++
>>>>>  libavcodec/h264_sei.c    | 86 ++++++++++++++++++++++++----------------
>>>>>  libavcodec/h264_sei.h    | 11 +++++
>>>>>  libavcodec/h264_slice.c  | 10 +++++
>>>>>  4 files changed, 82 insertions(+), 34 deletions(-)
>>>>
>>>> This seems to break fate
>>>>
>>>> TEST    cbs-h264-CVSE2_Sony_B
>>>> --- ./tests/ref/fate/cbs-h264-CVSE2_Sony_B	2020-03-15 16:08:13.692521532 +0100
>>>> +++ tests/data/fate/cbs-h264-CVSE2_Sony_B	2020-03-16 19:50:23.164302663 +0100
>>>> @@ -1 +0,0 @@
>>>> -ca8bdba497bd2f3b97c50d59692eb537
>>>> Test cbs-h264-CVSE2_Sony_B failed. Look at tests/data/fate/cbs-h264-CVSE2_Sony_B.err for details.
>>>> tests/Makefile:250: recipe for target 'fate-cbs-h264-CVSE2_Sony_B' failed
>>>> make: *** [fate-cbs-h264-CVSE2_Sony_B] Error 1
>>>>
>>>> thx
>>>
>>> I can't reproduce this. Are you using a clean tree?
>>
>> i had other patches in there, ill retest without tomorrow (too late now)
>> disregard my comment about there being an issue until i retest
> 
> sorry for te delay
> the failures persist with patches 1 to this
> 
> make: *** [fate-cbs-h264-CVSE2_Sony_B] Error 1
> make: *** [fate-cbs-h264-sei-1] Error 1
> make: *** [fate-h264-timecode] Error 134
> make: *** [fate-h264-mixed-nal-coding] Error 134
> make: *** [fate-h264-twofields-packet] Error 134
> make: *** [fate-h264-attachment-631] Error 134
> make: *** [fate-mov-tenc-only-encrypted] Error 134
> make: *** [fate-mov-frag-encrypted] Error 134
> make: *** [fate-mov-bbi-elst-starts-b] Error 134
> make: *** [fate-h264_mp4toannexb_ticket2991] Error 134
> make: *** [fate-copy-psp] Error 134
> 
> picking fate-h264-timecode, the failure looks like this:
> 
> Assertion n <= 31 && value < (1U << n) failed at libavcodec/put_bits.h:169

This is a level 2 assert. Please make sure to mention when you use
custom configure time options. No wonder we couldn't reproduce it.

> Aborted (core dumped)
> tests/Makefile:250: recipe for target 'fate-h264-timecode' failed
> make: *** [fate-h264-timecode] Error 134
> 
> #2  0x00005555563156cd in put_bits (s=0x7fffffffd190, n=32, value=990117888) at libavcodec/put_bits.h:169
> #3  0x0000555556315ec3 in decode_picture_timing (h=0x5555578239d8, gb=0x7fffffffd200, logctx=0x555557822740) at libavcodec/h264_sei.c:138
> #4  0x0000555556316be1 in ff_h264_sei_decode (h=0x5555578239d8, gb=0x7fffffffd2f8, ps=0x555557822f70, logctx=0x555557822740) at libavcodec/h264_sei.c:457
> #5  0x0000555556306711 in parse_nal_units (s=0x555557822d80, avctx=0x555557822740, buf=0x555557849090 "", buf_size=7993) at libavcodec/h264_parser.c:333
> #6  0x00005555563075ed in h264_parse (s=0x555557822d80, avctx=0x555557822740, poutbuf=0x7fffffffd508, poutbuf_size=0x7fffffffd510, buf=0x555557849090 "", buf_size=7993) at libavcodec/h264_parser.c:616
> #7  0x0000555555e40861 in av_parser_parse2 (s=0x555557822d80, avctx=0x555557822740, poutbuf=0x7fffffffd508, poutbuf_size=0x7fffffffd510, buf=0x555557848c40 "f\316\177\307\355'\021\252DOJ)V\207F", buf_size=1024, pts=-9223372036854775808, dts=-9223372036854775808, pos=7168) at libavcodec/parser.c:166
> #8  0x0000555555af0a83 in parse_packet (s=0x555557820940, pkt=0x7fffffffd7d0, stream_index=0, flush=0) at libavformat/utils.c:1468
> #9  0x0000555555af1828 in read_frame_internal (s=0x555557820940, pkt=0x7fffffffd7d0) at libavformat/utils.c:1682
> #10 0x0000555555af9131 in avformat_find_stream_info (ic=0x555557820940, options=0x555557822c80) at libavformat/utils.c:3826
> #11 0x0000555555670961 in open_input_file (o=0x7fffffffdb30, filename=0x7fffffffe536 "/home/michael/fatesamples/fate/fate-suite//h264/crew_cif_timecode-2.h264") at fftools/ffmpeg_opt.c:1195
> #12 0x000055555567ed59 in open_files (l=0x555557820218, inout=0x5555566262a7 "input", open_file=0x55555566fe3c <open_input_file>) at fftools/ffmpeg_opt.c:3350
> #13 0x000055555567ef0d in ffmpeg_parse_options (argc=17, argv=0x7fffffffe198) at fftools/ffmpeg_opt.c:3390
> #14 0x000055555569e839 in main (argc=17, argv=0x7fffffffe198) at fftools/ffmpeg.c:4871
> 
> 
> [...]
> 
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 



More information about the ffmpeg-devel mailing list