crash with H.264 MBAFF of height 676 or more
I am trying to trancecode from H.264 MBAF (encoded with x.264) to flv. It seems that MBAFF H.264 of height 676 or more crashes ffmpeg. FFmpeg said "[h264 @ 0x6da784]concealing 860 DC, 860 AC, 860 MV errors" many times and crashed with SIGABRT. ffdshow and VLC also crashes. I think this is maybe a libavcodec's bug because I asked CoreAVC users whether it crashed, and they said No. Sample File: I uploaded to /MPlayer/incoming/h264_MBAFF_height676 My environment: CPU: Pentium3 (Coppermine) OS: Fedora Core 5 kernel: 2.6.18-1.2257.fc5 glibc: 2.4-11 GDB: GNU gdb Red Hat Linux (6.3.0.0-1.134.fc5rh) (ffdshow and VLC is on Windows XP SP2) Command: /home/user1/ffmpeg-b/ffmpeg_g -i test.mp4 -y -vcodec flv -qscale 16 -me full ./test.flv Output: FFmpeg version SVN-r8268, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-pp --enable-liba52 --enable-libfaad --enable-libmp3lame --enable-libogg --enable-libvorbis --enable-gpl --cpu=pentium3 --disable-audio-oss --disable-audio-beos --disable-v4l --disable-v4l2 --disable-bktr --disable-dv1394 --disable-network --disable-ipv6 --enable-shared libavutil version: 49.3.0 libavcodec version: 51.38.0 libavformat version: 51.10.0 built on Mar 6 2007 15:33:42, gcc: 4.1.1 20070105 (Red Hat 4.1.1-51) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'files/ppfx00353.mp4': Duration: 00:00:03.3, start: 0.000000, bitrate: 45 kb/s Stream #0.0(und): Video: h264, yuv420p, 320x688, 29.97 fps(r) Output #0, flv, to './movie_thumbnail_tmp_d2kMDX.flv': Stream #0.0: Video: flv, yuv420p, 320x688, q=2-31, 200 kb/s, 29.97 fps(c) Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors2kbits/s [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors9kbits/s [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors5kbits/s [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors3kbits/s [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors2kbits/s [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors7kbits/s [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors [h264 @ 0xf0e784]concealing 860 DC, 860 AC, 860 MV errors frame= 100 q=16.0 Lsize= 62kB time=3.3 bitrate= 152.9kbits/s video:61kB audio:0kB global headers:0kB muxing overhead 2.881793% *** glibc detected *** /home/user1/ffmpeg-b/ffmpeg_g: corrupted double-linked list: 0x08206e68 *** ======= Backtrace: ========= /lib/libc.so.6[0x85fe9f] /lib/libc.so.6[0x8617ae] /lib/libc.so.6(__libc_free+0x78)[0x864f6f] /usr/local/lib/libavutil.so.49(av_freep+0x16)[0xc30316] ======= Memory map: ======== 00101000-0010c000 r-xp 00000000 21:01 11877613 /usr/lib/liba52.so.0.0.0 0010c000-0010d000 rwxp 0000a000 21:01 11877613 /usr/lib/liba52.so.0.0.0 0010d000-0010e000 rwxp 0010d000 00:00 0 00110000-0018a000 r-xp 00000000 21:01 117525 /usr/local/lib/libavformat.so.51.10.0 0018a000-0018d000 rwxp 00079000 21:01 117525 /usr/local/lib/libavformat.so.51.10.0 0018d000-00582000 r-xp 00000000 21:01 117521 /usr/local/lib/libavcodec.so.51.38.0 00582000-00588000 rwxp 003f4000 21:01 117521 /usr/local/lib/libavcodec.so.51.38.0 00588000-005f0000 rwxp 00588000 00:00 0 005f0000-00631000 r-xp 00000000 21:01 11877611 /usr/lib/libmp3lame.so.0.0.0 00631000-00633000 rwxp 00041000 21:01 11877611 /usr/lib/libmp3lame.so.0.0.0 00633000-00664000 rwxp 00633000 00:00 0 00664000-0066f000 r-xp 00000000 21:01 527255 /usr/lib/libvorbisenc.so.2.0.2 0066f000-0075e000 rwxp 0000a000 21:01 527255 /usr/lib/libvorbisenc.so.2.0.2 0075e000-00760000 rwxp 0075e000 00:00 0 00760000-007a3000 r-xp 00000000 21:01 11877621 /usr/lib/libfaad.so.0.0.0 007a3000-007a6000 rwxp 00042000 21:01 11877621 /usr/lib/libfaad.so.0.0.0 007a6000-007b1000 r-xp 00000000 21:01 48998 /lib/libgcc_s-4.1.1-20070108.so.1 007b1000-007b2000 rwxp 0000a000 21:01 48998 /lib/libgcc_s-4.1.1-20070108.so.1 007e1000-007fa000 r-xp 00000000 21:01 53449 /lib/ld-2.4.so 007fa000-007fb000 r-xp 00018000 21:01 53449 /lib/ld-2.4.so 007fb000-007fc000 rwxp 00019000 21:01 53449 /lib/ld-2.4.so 007fe000-0092b000 r-xp 00000000 21:01 53450 /lib/libc-2.4.so 0092b000-0092d000 r-xp 0012d000 21:01 53450 /lib/libc-2.4.so 0092d000-0092e000 rwxp 0012f000 21:01 53450 /lib/libc-2.4.so 0092e000-00931000 rwxp 0092e000 00:00 0 00933000-00935000 r-xp 00000000 21:01 51558 /lib/libdl-2.4.so 00935000-00936000 r-xp 00001000 21:01 51558 /lib/libdl-2.4.so 00936000-00937000 rwxp 00002000 21:01 51558 /lib/libdl-2.4.so 00939000-0095c000 r-xp 00000000 21:01 53451 /lib/libm-2.4.so 0095c000-0095d000 r-xp 00022000 21:01 53451 /lib/libm-2.4.so 0095d000-0095e000 rwxp 00023000 21:01 53451 /lib/libm-2.4.so 00960000-00973000 r-xp 00000000 21:01 527456 /usr/lib/libz.so.1.2.3 00973000-00974000 rwxp 00012000 21:01 527456 /usr/lib/libz.so.1.2.3 00976000-0097b000 r-xp 00000000 21:01 526209 /usr/lib/libogg.so.0.5.3 0097b000-0097c000 rwxp 00004000 21:01 526209 /usr/lib/libogg.so.0.5.3 00ae0000-00ae1000 r-xp 00ae0000 00:00 0 [vdso] 00c2c000-00c33000 r-xp 00000000 21:01 113560 /usr/local/lib/libavutil.so.49.3.0 00c33000-00c34000 rwxp 00006000 21:01 113560 /usr/local/lib/libavutil.so.49.3.0 00c34000-00c36000 rwxp 00c34000 00:00 0 00d90000-00dac000 r-xp 00000000 21:01 520954 /usr/lib/libvorbis.so.0.3.1 00dac000-00dba000 rwxp 0001c000 21:01 520954 /usr/lib/libvorbis.so.0.3.1 08048000-08058000 r-xp 00000000 22:01 17367411 /home/user1/ffmpeg-b/ffmpeg_g 08058000-08059000 rw-p 0000f000 22:01 17367411 /home/user1/ffmpeg-b/ffmpeg_g 08059000-0805a000 rw-p 08059000 00:00 0 081a9000-0836e000 rw-p 081a9000 00:00 0 b7b00000-b7b21000 rw-p b7b00000 00:00 0 b7b21000-b7c00000 ---p b7b21000 00:00 0 b7cf5000-b7fa8000 rw-p b7cf5000 00:00 0 bf963000-bf978000 rwxp bf963000 00:00 0 [stack] ???????? GDB: (gdb) backtrace #0 0x00bab402 in __kernel_vsyscall () #1 0x00825ee9 in raise () from /lib/libc.so.6 #2 0x008274f1 in abort () from /lib/libc.so.6 #3 0x0085a53b in __libc_message () from /lib/libc.so.6 #4 0x0085fe9f in malloc_consolidate () from /lib/libc.so.6 #5 0x008617ae in _int_free () from /lib/libc.so.6 #6 0x00864f6f in free () from /lib/libc.so.6 #7 0x00cdf316 in av_freep () from /usr/local/lib/libavutil.so.49 (gdb) disass $pc-32 $pc+32 Dump of assembler code from 0xbab3e2 to 0xbab422: 0x00bab3e2: add %al,(%eax) 0x00bab3e4: add %al,(%eax) 0x00bab3e6: add %al,(%eax) 0x00bab3e8: add %al,(%eax) 0x00bab3ea: add %al,(%eax) 0x00bab3ec: add %al,(%eax) 0x00bab3ee: add %al,(%eax) 0x00bab3f0: add %al,(%eax) 0x00bab3f2: add %al,(%eax) 0x00bab3f4: add %al,(%eax) 0x00bab3f6: add %al,(%eax) 0x00bab3f8: add %al,(%eax) 0x00bab3fa: add %al,(%eax) 0x00bab3fc: add %al,(%eax) 0x00bab3fe: add %al,(%eax) 0x00bab400 <__kernel_vsyscall+0>: int $0x80 0x00bab402 <__kernel_vsyscall+2>: ret 0x00bab403 <__kernel_vsyscall+3>: nop 0x00bab404 <__kernel_vsyscall+4>: nop 0x00bab405 <__kernel_vsyscall+5>: nop 0x00bab406 <__kernel_vsyscall+6>: nop 0x00bab407 <__kernel_vsyscall+7>: nop 0x00bab408 <__kernel_vsyscall+8>: nop 0x00bab409 <__kernel_vsyscall+9>: nop 0x00bab40a <__kernel_vsyscall+10>: nop 0x00bab40b <__kernel_vsyscall+11>: nop 0x00bab40c <__kernel_vsyscall+12>: nop 0x00bab40d <__kernel_vsyscall+13>: nop 0x00bab40e <__kernel_vsyscall+14>: nop 0x00bab40f <__kernel_vsyscall+15>: nop 0x00bab410 <__kernel_vsyscall+16>: nop 0x00bab411 <__kernel_vsyscall+17>: nop 0x00bab412 <__kernel_vsyscall+18>: nop 0x00bab413 <__kernel_vsyscall+19>: nop 0x00bab414 <__kernel_vsyscall+20>: nop 0x00bab415 <__kernel_vsyscall+21>: nop 0x00bab416 <__kernel_vsyscall+22>: nop 0x00bab417 <__kernel_vsyscall+23>: nop 0x00bab418 <__kernel_vsyscall+24>: nop 0x00bab419 <__kernel_vsyscall+25>: nop 0x00bab41a <__kernel_vsyscall+26>: nop 0x00bab41b <__kernel_vsyscall+27>: nop 0x00bab41c <__kernel_vsyscall+28>: nop 0x00bab41d <__kernel_vsyscall+29>: nop 0x00bab41e <__kernel_vsyscall+30>: nop 0x00bab41f <__kernel_vsyscall+31>: nop 0x00bab420 <__kernel_sigreturn+0>: pop %eax 0x00bab421 <__kernel_sigreturn+1>: mov $0x77,%eax End of assembler dump. (gdb) info all-registers eax 0x0 0 ecx 0x5827 22567 edx 0x6 6 ebx 0x5827 22567 esp 0xbf9cf438 0xbf9cf438 ebp 0xbf9cf444 0xbf9cf444 esi 0xbf9cf4e4 -1080232732 edi 0x92cff4 9621492 eip 0xbab402 0xbab402 eflags 0x246 582 cs 0x73 115 ss 0x7b 123 ds 0x7b 123 es 0x7b 123 fs 0x0 0 gs 0x33 51 st0 -nan(0x8080808080808080) (raw 0xffff8080808080808080) st1 -nan(0x8080808080808080) (raw 0xffff8080808080808080) st2 -nan(0x8080808080808080) (raw 0xffff8080808080808080) st3 30000 (raw 0x400dea60000000000000) st4 0.033366666666666666666457054246652802 (raw 0x3ffa88ab7c61c2038cc4) st5 0 (raw 0x00000000000000000000) st6 62010 (raw 0x400ef23a000000000000) st7 2.881793259151749886370907915988937 (raw 0x4000b86f4cfe78f61000) fctrl 0x37f 895 fstat 0x20 32 ftag 0xffff 65535 fiseg 0x73 115 fioff 0x83ce63 8638051 foseg 0x7b 123 fooff 0xbf9cca04 -1080243708 fop 0x55c 1372 xmm0 {v4_float = {0xaae60, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0, 0xe6, 0x2a, 0x49, 0x0 <repeats 12 times>}, v8_int16 = {0xe600, 0x492a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x492ae600, 0x0, 0x0, 0x0}, v2_int64 = {0x492ae600, 0x0}, uint128 = 0x000000000000000000000000492ae600} xmm1 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000} xmm2 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000} xmm3 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000} xmm4 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000} xmm5 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000} xmm6 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000} xmm7 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000} mxcsr 0x1f80 8064 mm0 {uint64 = 0x8080808080808080, v2_int32 = {0x80808080, 0x80808080}, v4_int16 = {0x8080, 0x8080, 0x8080, 0x8080}, v8_int8 = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80}} mm1 {uint64 = 0x8080808080808080, v2_int32 = {0x80808080, 0x80808080}, v4_int16 = {0x8080, 0x8080, 0x8080, 0x8080}, v8_int8 = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80}} mm2 {uint64 = 0x8080808080808080, v2_int32 = {0x80808080, 0x80808080}, v4_int16 = {0x8080, 0x8080, 0x8080, 0x8080}, v8_int8 = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80}} mm3 {uint64 = 0xea60000000000000, v2_int32 = {0x0, 0xea600000}, v4_int16 = {0x0, 0x0, 0x0, 0xea60}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x60, 0xea}} mm4 {uint64 = 0x88ab7c61c2038cc4, v2_int32 = {0xc2038cc4, 0x88ab7c61}, v4_int16 = {0x8cc4, 0xc203, 0x7c61, 0x88ab}, v8_int8 = {0xc4, 0x8c, 0x3, 0xc2, 0x61, 0x7c, 0xab, 0x88}} mm5 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}} mm6 {uint64 = 0xf23a000000000000, v2_int32 = {0x0, 0xf23a0000}, v4_int16 = {0x0, 0x0, 0x0, 0xf23a}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3a, 0xf2}} mm7 {uint64 = 0xb86f4cfe78f61000, v2_int32 = {0x78f61000, 0xb86f4cfe}, v4_int16 = {0x1000, 0x78f6, 0x4cfe, 0xb86f}, v8_int8 = {0x0, 0x10, 0xf6, 0x78, 0xfe, 0x4c, 0x6f, 0xb8}}
On Tue, 6 Mar 2007, stream47 wrote:
I am trying to trancecode from H.264 MBAF (encoded with x.264) to flv. It seems that MBAFF H.264 of height 676 or more crashes ffmpeg. FFmpeg said "[h264 @ 0x6da784]concealing 860 DC, 860 AC, 860 MV errors" many times and crashed with SIGABRT. ffdshow and VLC also crashes.
Diagnosis: Many parts of libavcodec assume that allocated frame height = visible frame height rounded up to a multiple of 16. But H.264 MBAFF needs to have an allocated height divisible by 32. If the visible resolution of your video is not divisble by 32, x264 has to round it up and add a cropping rectangle. If the cropping value exceeds 15, libavcodec crashes due to the above assumption. (It is possible to use a large crop value in progressive videos too, but there's no reason for an encoder to choose that except in MBAFF mode.) But I can't easily fix it. I think any potential fix would have to at least modify the get_buffer api, along with some mpeg-common code. A quick kludge to stop the crash would be to ignore cropping, and just display the whole coded frame including the padding region.
I think this is maybe a libavcodec's bug because I asked CoreAVC users whether it crashed, and they said No.
Of course a crash is a bug. That would be true even if the stream were invalid. --Loren Merritt
On Tue, 6 Mar 2007 09:07:38 -0700 (MST) Loren Merritt <lorenm at u.washington.edu> wrote:
Many parts of libavcodec assume that allocated frame height = visible frame height rounded up to a multiple of 16. But H.264 MBAFF needs to have an allocated height divisible by 32.
Thanks. I too, found "height 676 or more" was misunderstanding. It can't decode height 112 and 144 properly, and it can decode 704. "H.264 MBAFF height not divisible by 32" crashes libavcodec.
On Tue, Mar 06, 2007 at 11:07:05PM +0900, stream47 wrote:
I am trying to trancecode from H.264 MBAF (encoded with x.264) to flv. It seems that MBAFF H.264 of height 676 or more crashes ffmpeg. FFmpeg said "[h264 @ 0x6da784]concealing 860 DC, 860 AC, 860 MV errors" many times and crashed with SIGABRT. ffdshow and VLC also crashes. I think this is maybe a libavcodec's bug because I asked CoreAVC users whether it crashed, and they said No.
Sample File: I uploaded to /MPlayer/incoming/h264_MBAFF_height676
None of these files crashes ffmpeg anymore [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The worst form of inequality is to try to make unequal things equal. -- Aristotle
participants (3)
-
lorenm@u.washington.edu -
michaelni@gmx.at -
takuma@stream.st