[FFmpeg-trac] #64(avcodec:new): Crash when change resolution

FFmpeg trac at avcodec.org
Fri Apr 15 16:32:54 CEST 2011


#64: Crash when change resolution
----------------------+------------------------
 Reporter:  ivigasin  |        Type:  defect
   Status:  new       |    Priority:  important
Component:  avcodec   |     Version:  git
 Keywords:            |  Blocked By:
 Blocking:            |  Reproduced:  0
 Analyzed:  0         |
----------------------+------------------------
 Using latest version from GIT I try to decode H.264 file and FFmpeg
 crashes every time. The file contains several frames with ~900x700
 resolution and one frame 1920x1080 (which does not to contradict to H.264
 specification).

 Some time ago there was similar issue (issue2393 in old tracker) and it
 was successfully fixed. The bug was introduced again after git revision
 aecd0a4 (probably with ffmpeg-mt merge). If it is required I'll find the
 exact revision when the bug was introduced.

 Platform is WIN32.

 The command line is:
 ffmpeg -i all_filese_together.264 -f null out.raw

 Input file and FFmpeg information:
 C:\sdk\ffmpeg-git-mingw-release\bin>ffmpeg -v 9 -loglevel 99 -i
 all_filese_together.264
 FFmpeg version git-N-29122-gb8a4444, Copyright (c) 2000-2011 the FFmpeg
 developers
   built on Apr 14 2011 05:02:24 with gcc 4.4.2
   configuration: --target-os=mingw32 --cross-prefix=i686-mingw32-
 --disable-debug --cc='ccache i686-mingw32-gcc-4.4' --prefix=/home/ivan/opt
 /ffmpeg-git-mingw-release --enable-cross-compile --disable-hwaccels
 --disable-decoder=ass --enable-memalign-hack --arch=x86 --enable-gpl --e
 nable-version3 --enable-runtime-cpudetect --enable-ffplay --enable-shared
 --disable-static --disable-indevs --disable-network --enable-pthre
 ads
   libavutil    50. 40. 1 / 50. 40. 1
   libavcodec   52.119. 0 / 52.119. 0
   libavformat  52.107. 0 / 52.107. 0
   libavdevice  52.  4. 0 / 52.  4. 0
   libavfilter   1. 78. 0 /  1. 78. 0
   libswscale    0. 13. 0 /  0. 13. 0
 [NULL @ 0077f270] Probed with size=2048 and score=51
 [h264 @ 00780280] Unsupported bit depth: 0
 [h264 @ 00780280] missing picture in access unit
 [h264 @ 0077f270] Estimating duration from bitrate, this may be inaccurate

 Debugger information:
 (gdb) run ...
 .....
 Seems stream 0 codec frame rate differs from container frame rate: 50.00
 (50/1) -> 25.00 (50/2)
 Input #0, h264, from 'all_filese_together.264':
   Duration: N/A, bitrate: N/A
     Stream #0.0, 19, 1/1200000: Video: h264 (Baseline), yuv420p, 960x544,
 1/50, 25 fps, 25 tbr, 1200k tbn, 50 tbc
 At least one output file must be specified

   libavfilter   1. 78. 0 /  1. 78. 0
   libswscale    0. 13. 0 /  0. 13. 0
 [h264 @ 008404c0] missing picture in access unit
 [h264 @ 0083f280] Estimating duration from bitrate, this may be inaccurate

 Seems stream 0 codec frame rate differs from container frame rate: 50.00
 (50/1) -> 25.00 (50/2)
 Input #0, h264, from 'all_filese_together.264':
   Duration: N/A, bitrate: N/A
     Stream #0.0: Video: h264 (Baseline), yuv420p, 960x544, 25 fps, 25 tbr,
 1200k tbn, 50 tbc
 [buffer @ 006bfe40] w:960 h:544 pixfmt:yuv420p
 Output #0, null, to 'out.raw':
   Metadata:
     encoder         : Lavf52.107.0
     Stream #0.0: Video: rawvideo, yuv420p, 960x544, q=2-31, 200 kb/s, 90k
 tbn, 25 tbc
 Stream mapping:
   Stream #0.0 -> #0.0
 Press [q] to stop encoding

 Program received signal SIGSEGV, Segmentation fault.
 0x6d78aeb9 in av_vsrc_buffer_add_frame2 (buffer_filter=0x6bfe40,
 frame=0x28eea8, pts=680000, pixel_aspect={num = 0, den = 1}, width=1920,
     height=1088, pix_fmt=PIX_FMT_YUV420P, sws_param=0x41a8d2 "0:0") at
 /home/ivan/sdk/ffmpeg-git/libavfilter/vsrc_buffer.c:60
 60              av_log(buffer_filter, AV_LOG_INFO, "Changing filter graph
 input to accept %dx%d %d (%d %d)\n",
 (gdb) bt
 #0  0x6d78aeb9 in av_vsrc_buffer_add_frame2 (buffer_filter=0x6bfe40,
 frame=0x28eea8, pts=680000, pixel_aspect={num = 0, den = 1},
     width=1920, height=1088, pix_fmt=PIX_FMT_YUV420P, sws_param=0x41a8d2
 "0:0") at /home/ivan/sdk/ffmpeg-git/libavfilter/vsrc_buffer.c:60
 #1  0x00406148 in output_packet (ist=<value optimized out>,
 ist_index=<value optimized out>, ost_table=0x8acf20, nb_ostreams=1,
     pkt=0x28f190) at /home/ivan/sdk/ffmpeg-git/ffmpeg.c:1638
 #2  0x0040951a in transcode (nb_output_files=<value optimized out>,
 nb_input_files=<value optimized out>,
     stream_maps=<value optimized out>, nb_stream_maps=0) at /home/ivan/sdk
 /ffmpeg-git/ffmpeg.c:2709
 #3  0x0040a8b3 in main (argc=6, argv=0x6b29f8) at /home/ivan/sdk/ffmpeg-
 git/ffmpeg.c:4459
 (gdb) disass $pc-32 $pc+32
 Dump of assembler code from 0x6d78ae99 to 0x6d78aed9:
 0x6d78ae99 <av_vsrc_buffer_add_frame2+89>:      mov    0x10c(%ebx),%ecx
 0x6d78ae9f <av_vsrc_buffer_add_frame2+95>:      mov    0x70(%esp),%edx
 0x6d78aea3 <av_vsrc_buffer_add_frame2+99>:      mov    0x20(%edx),%eax
 0x6d78aea6 <av_vsrc_buffer_add_frame2+102>:     mov    0x88(%esp),%edx
 0x6d78aead <av_vsrc_buffer_add_frame2+109>:     mov    (%eax),%eax
 0x6d78aeaf <av_vsrc_buffer_add_frame2+111>:     mov    0x8(%eax),%eax
 0x6d78aeb2 <av_vsrc_buffer_add_frame2+114>:     mov    %eax,0x4c(%esp)
 0x6d78aeb6 <av_vsrc_buffer_add_frame2+118>:     mov    0x20(%eax),%eax
 0x6d78aeb9 <av_vsrc_buffer_add_frame2+121>:     mov    (%eax),%eax
 0x6d78aebb <av_vsrc_buffer_add_frame2+123>:     mov    0x38(%eax),%eax
 0x6d78aebe <av_vsrc_buffer_add_frame2+126>:     mov    %ecx,0x18(%esp)
 0x6d78aec2 <av_vsrc_buffer_add_frame2+130>:     mov    0x90(%esp),%ecx
 0x6d78aec9 <av_vsrc_buffer_add_frame2+137>:     mov    %edx,0xc(%esp)
 0x6d78aecd <av_vsrc_buffer_add_frame2+141>:     movl
 $0x6d79dfdc,0x8(%esp)
 0x6d78aed5 <av_vsrc_buffer_add_frame2+149>:     mov    %eax,0x1c(%esp)
 End of assembler dump.

 (gdb) info all-registers
 eax            0x0      0
 ecx            0x0      0
 edx            0x780    1920
 ebx            0xa30010 10682384
 esp            0x28ec70 0x28ec70
 ebp            0x28eea8 0x28eea8
 esi            0x0      0
 edi            0x1      1
 eip            0x6d78aeb9       0x6d78aeb9 <av_vsrc_buffer_add_frame2+121>
 eflags         0x210283 [ CF SF IF RF ID ]
 cs             0x23     35
 ss             0x2b     43
 ds             0x2b     43
 es             0x2b     43
 fs             0x53     83
 gs             0x2b     43
 st0            -nan(0x707070707070707)  (raw 0xffff0707070707070707)
 st1            -nan(0x707070707070707)  (raw 0xffff0707070707070707)
 st2            -nan(0x8080808082828282) (raw 0xffff8080808082828282)
 st3            -nan(0x8080808082828282) (raw 0xffff8080808082828282)
 st4            -nan(0x8080808082828282) (raw 0xffff8080808082828282)
 st5            -nan(0x8080808082828282) (raw 0xffff8080808082828282)
 st6            1e+100   (raw 0x414b924d692ca61be800)
 st7            0        (raw 0x00000000000000000000)
 fctrl          0x37f    895
 fstat          0x20     32
 ftag           0xffff   65535
 fiseg          0x23     35
 fioff          0x406569 4220265
 foseg          0x2b     43
 fooff          0x8402fc 8651516
 fop            0x0      0
 xmm0           {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}
 xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x79, 0x0, 0x41, 0x0, 0x1, 0x0, 0x7b, 0x0, 0x21,
     0x0, 0xff, 0xff, 0x1, 0x0, 0x4, 0x0}, v8_int16 = {0x79, 0x41, 0x1,
 0x7b, 0x21, 0xffff, 0x1, 0x4}, v4_int32 = {0x410079, 0x7b0001,
     0xffff0021, 0x40001}, v2_int64 = {0x7b000100410079, 0x40001ffff0021},
 uint128 = 0x00040001ffff0021007b000100410079}
 xmm2           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x7b, 0x0, 0x42, 0x0, 0xfe, 0xff, 0x79, 0x0, 0x1b,
     0x0, 0xfb, 0xff, 0x0, 0x0, 0x5, 0x0}, v8_int16 = {0x7b, 0x42, 0xfffe,
 0x79, 0x1b, 0xfffb, 0x0, 0x5}, v4_int32 = {0x42007b, 0x79fffe,
     0xfffb001b, 0x50000}, v2_int64 = {0x79fffe0042007b, 0x50000fffb001b},
 uint128 = 0x00050000fffb001b0079fffe0042007b}
 xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x7d, 0x0, 0x41, 0x0, 0x1, 0x0, 0x7f, 0x0, 0x36,
     0x0, 0x3, 0x0, 0x1, 0x0, 0x3, 0x0}, v8_int16 = {0x7d, 0x41, 0x1, 0x7f,
 0x36, 0x3, 0x1, 0x3}, v4_int32 = {0x41007d, 0x7f0001, 0x30036,
     0x30001}, v2_int64 = {0x7f00010041007d, 0x3000100030036}, uint128 =
 0x0003000100030036007f00010041007d}
 xmm4           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x5, 0x0, 0x4, 0x0, 0x0, 0x0, 0x3, 0x0, 0x7, 0x0,
     0x2, 0x0, 0x5, 0x0, 0x5, 0x0}, v8_int16 = {0x5, 0x4, 0x0, 0x3, 0x7,
 0x2, 0x5, 0x5}, v4_int32 = {0x40005, 0x30000, 0x20007, 0x50005},
   v2_int64 = {0x3000000040005, 0x5000500020007}, uint128 =
 0x00050005000200070003000000040005}
 xmm5           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x7d, 0x44, 0x0, 0x7b, 0x1d, 0x0, 0x2, 0x7, 0x0,
     0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x447d, 0x7b00, 0x1d,
 0x702, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x7b00447d, 0x702001d,
     0x0, 0x0}, v2_int64 = {0x702001d7b00447d, 0x0}, uint128 =
 0x00000000000000000702001d7b00447d}
 st7            0        (raw 0x00000000000000000000)
 fctrl          0x37f    895
 fstat          0x20     32
 ftag           0xffff   65535
 fiseg          0x23     35
 fioff          0x406569 4220265
 foseg          0x2b     43
 fooff          0x8402fc 8651516
 fop            0x0      0
 xmm0           {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}
 xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x79, 0x0, 0x41, 0x0, 0x1, 0x0, 0x7b, 0x0, 0x21,
     0x0, 0xff, 0xff, 0x1, 0x0, 0x4, 0x0}, v8_int16 = {0x79, 0x41, 0x1,
 0x7b, 0x21, 0xffff, 0x1, 0x4}, v4_int32 = {0x410079, 0x7b0001,
     0xffff0021, 0x40001}, v2_int64 = {0x7b000100410079, 0x40001ffff0021},
 uint128 = 0x00040001ffff0021007b000100410079}
 xmm2           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x7b, 0x0, 0x42, 0x0, 0xfe, 0xff, 0x79, 0x0, 0x1b,
     0x0, 0xfb, 0xff, 0x0, 0x0, 0x5, 0x0}, v8_int16 = {0x7b, 0x42, 0xfffe,
 0x79, 0x1b, 0xfffb, 0x0, 0x5}, v4_int32 = {0x42007b, 0x79fffe,
     0xfffb001b, 0x50000}, v2_int64 = {0x79fffe0042007b, 0x50000fffb001b},
 uint128 = 0x00050000fffb001b0079fffe0042007b}
 xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x7d, 0x0, 0x41, 0x0, 0x1, 0x0, 0x7f, 0x0, 0x36,
     0x0, 0x3, 0x0, 0x1, 0x0, 0x3, 0x0}, v8_int16 = {0x7d, 0x41, 0x1, 0x7f,
 0x36, 0x3, 0x1, 0x3}, v4_int32 = {0x41007d, 0x7f0001, 0x30036,
     0x30001}, v2_int64 = {0x7f00010041007d, 0x3000100030036}, uint128 =
 0x0003000100030036007f00010041007d}
 xmm4           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x5, 0x0, 0x4, 0x0, 0x0, 0x0, 0x3, 0x0, 0x7, 0x0,
     0x2, 0x0, 0x5, 0x0, 0x5, 0x0}, v8_int16 = {0x5, 0x4, 0x0, 0x3, 0x7,
 0x2, 0x5, 0x5}, v4_int32 = {0x40005, 0x30000, 0x20007, 0x50005},
   v2_int64 = {0x3000000040005, 0x5000500020007}, uint128 =
 0x00050005000200070003000000040005}
 xmm5           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
 v16_int8 = {0x7d, 0x44, 0x0, 0x7b, 0x1d, 0x0, 0x2, 0x7, 0x0,
     0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x447d, 0x7b00, 0x1d,
 0x702, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x7b00447d, 0x702001d,
     0x0, 0x0}, v2_int64 = {0x702001d7b00447d, 0x0}, uint128 =
 0x00000000000000000702001d7b00447d}
 ---Type <return> to continue, or q <return> to quit---
 xmm6           {v4_float = {0x244582, 0x0, 0x0, 0x0}, v2_double = {0x0,
 0x0}, v16_int8 = {0x9, 0x16, 0x11, 0x4a, 0x16, 0x0, 0x1c, 0x14,
     0xe, 0x1c, 0xb, 0x8, 0x11, 0xb, 0x23, 0x5}, v8_int16 = {0x1609,
 0x4a11, 0x16, 0x141c, 0x1c0e, 0x80b, 0xb11, 0x523}, v4_int32 = {
     0x4a111609, 0x141c0016, 0x80b1c0e, 0x5230b11}, v2_int64 =
 {0x141c00164a111609, 0x5230b11080b1c0e},
   uint128 = 0x05230b11080b1c0e141c00164a111609}
 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   [ IM DM ZM OM UM PM ]
 mm0            {uint64 = 0x707070707070707, v2_int32 = {0x7070707,
 0x7070707}, v4_int16 = {0x707, 0x707, 0x707, 0x707}, v8_int8 = {0x7,
     0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7}}
 mm1            {uint64 = 0x707070707070707, v2_int32 = {0x7070707,
 0x7070707}, v4_int16 = {0x707, 0x707, 0x707, 0x707}, v8_int8 = {0x7,
     0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7}}
 mm2            {uint64 = 0x8080808082828282, v2_int32 = {0x82828282,
 0x80808080}, v4_int16 = {0x8282, 0x8282, 0x8080, 0x8080}, v8_int8 = {
     0x82, 0x82, 0x82, 0x82, 0x80, 0x80, 0x80, 0x80}}
 mm3            {uint64 = 0x8080808082828282, v2_int32 = {0x82828282,
 0x80808080}, v4_int16 = {0x8282, 0x8282, 0x8080, 0x8080}, v8_int8 = {
     0x82, 0x82, 0x82, 0x82, 0x80, 0x80, 0x80, 0x80}}
 mm4            {uint64 = 0x8080808082828282, v2_int32 = {0x82828282,
 0x80808080}, v4_int16 = {0x8282, 0x8282, 0x8080, 0x8080}, v8_int8 = {
     0x82, 0x82, 0x82, 0x82, 0x80, 0x80, 0x80, 0x80}}
 mm5            {uint64 = 0x8080808082828282, v2_int32 = {0x82828282,
 0x80808080}, v4_int16 = {0x8282, 0x8282, 0x8080, 0x8080}, v8_int8 = {
     0x82, 0x82, 0x82, 0x82, 0x80, 0x80, 0x80, 0x80}}
 mm6            {uint64 = 0x924d692ca61be800, v2_int32 = {0xa61be800,
 0x924d692c}, v4_int16 = {0xe800, 0xa61b, 0x692c, 0x924d}, v8_int8 = {
     0x0, 0xe8, 0x1b, 0xa6, 0x2c, 0x69, 0x4d, 0x92}}
 mm7            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}

 Thank you and kind regards, Ivan.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/64>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list