New submission from Luca Abeni <[email protected]>:
With today's svn, I can reproduce a crash in the following way:
make libavformat/output-example
libavformat/output-example test.avi
./ffmpeg -i test.avi -s 854x480 -bf 1 -an test1.avi
FFmpeg version SVN-r25711, Copyright (c) 2000-2010 the FFmpeg
developers
built on Nov 9 2010 09:35:38 with gcc 4.4.3
configuration:
libavutil 50.33. 0 / 50.33. 0
libavcore 0.12. 0 / 0.12. 0
libavcodec 52.94. 3 / 52.94. 3
libavformat 52.84. 0 / 52.84. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.59. 0 / 1.59. 0
libswscale 0.12. 0 / 0.12. 0
Input #0, avi, from 'test.avi':
Metadata:
encoder : Lavf52.84.0
Duration: 00:00:05.01, start: 0.000000, bitrate: 748 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 352x288 [PAR 1:1 DAR
11:9], 25 tbr, 25 tbn, 25 tbc
Stream #0.1: Audio: mp2, 44100 Hz, 2 channels, s16, 64 kb/s
File 'test1.avi' already exists. Overwrite ? [y/N] y
[buffer @ 0x8ddf9c0] w:352 h:288 pixfmt:yuv420p
[scale @ 0x8ddfd50] w:352 h:288 fmt:yuv420p -> w:854 h:480
fmt:yuv420p flags:0xa0000004
Output #0, avi, to 'test1.avi':
Metadata:
ISFT : Lavf52.84.0
Stream #0.0: Video: mpeg4, yuv420p, 854x480 [PAR 79:115 DAR
33733:27600], q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
Segmentation fault
Additional information, when running in gdb:
(gdb) bt
#0 0x0846f289 in sad16_sse2 (v=0x0,
blk2=0xb7a2f386
"\021\021\021\021\021\021\021\021\021\021\022\023\023\023\024\024
\364\364\364\364\364\364\364\364\364\364\233\233\233\233\233\233\
233\233\233\233\233\233\233\233\233\233\267\267\267\267\267\267\2
67\267\267\267\267\267\273\273\273\273\273\273\273\277\277\277\27
7\277\277\277\277\303\303\303\303\303\303\303\303\310\310\310\310
\310\310\310\310\310\310\310\310\310\310\310\310\314\314\314\314\
314\314\314\314\320\320\320\320\320\320\320\320\324\324\324\324\3
24\324\324\324\324\324\324\324\324\324\324\324\331\331\331\331\33
1\331\331\331\335\335\335\335\335\335\335\335\341\341\341\341\341
\341\341\341\345\345\345\345\345\345\345\345\345\345\345\345\345\
345\345\345\352\352\352\352\352\352\352\352\356\356\356\356\356\3
56\356\356\362\362\362\362\362\362\362\362\362\362\362\362\362\36
2\362\362\366\366", <incomplete sequence \366>...,
blk1=0xb7bb3386
"\v\v\f\f\r\r\r\016\016\017\017\020\020\020\020\020\006\006\006\0
06\006\006\006\006\006\006\245\245\245\245\245\245\245\245\245\24
5\245\245\245\245\245\245\245\245\245\245\245\245\245\245\251\251
\251\251\251\251\251\251\262\262\263\263\264\264\265\265\265\265\
266\266\267\270\270\270\271\271\272\272\272\273\273\274\274\274\2
75\275\275\276\276\277\277\300\300\301\301\301\302\302\303\303\30
3\304\304\305\305\305\305\306\306\307\310\310\310\311\311\312\312
\312\313\313\314\314\314\315\315\315\316\316\317\317\320\320\321\
321\322\322\322\323\323\323\324\324\325\325\325\325\326\327\327\3
30\330\330\331\331\332\332\332\333\333\334\334\335\335\335\335\33
6\336\337\340\340\340\341\341\342\342\342\343\343\344\344\344\345
\345\346\346\347\347\347\350\350\350\351\351\352\352\353\353\353\
354", <incomplete sequence \354>..., stride=896, h=16)
at libavcodec/x86/motion_est_mmx.c:96
#1 0x082b842b in mpeg4_encode_mb (s=0x8bf1ea0, block=0x8cc8d80,
motion_x=0,
motion_y=0) at libavcodec/mpeg4videoenc.c:670
#2 0x082f9f50 in encode_mb_internal (c=0x8be2a40, arg=0x8bf1f74)
at libavcodec/mpegvideo_enc.c:1749
#3 encode_mb (c=0x8be2a40, arg=0x8bf1f74) at
libavcodec/mpegvideo_enc.c:1785
#4 encode_thread (c=0x8be2a40, arg=0x8bf1f74)
at libavcodec/mpegvideo_enc.c:2607
#5 0x083995fe in avcodec_default_execute (c=0x8be2a40,
func=0x82f75d0 <encode_thread>, arg=0x380, ret=0x10, count=1,
size=4)
at libavcodec/utils.c:416
#6 0x082e661f in encode_picture (avctx=0x8be2a40, buf=0xb7cef020
"",
buf_size=2459720, data=0xbfffe6bc) at
libavcodec/mpegvideo_enc.c:2969
#7 MPV_encode_picture (avctx=0x8be2a40, buf=0xb7cef020 "",
buf_size=2459720,
data=0xbfffe6bc) at libavcodec/mpegvideo_enc.c:1259
#8 0x0839a478 in avcodec_encode_video (avctx=0x8be2a40,
buf=0xb7cef020 "",
buf_size=2459720, pict=0xbfffe6bc) at libavcodec/utils.c:571
#9 0x0807af27 in do_video_out (ist=<value optimized out>,
ist_index=<value optimized out>, ost_table=<value optimized
out>,
nb_ostreams=1, pkt=0xbfffeab4) at ffmpeg.c:1228
#10 output_packet (ist=<value optimized out>, ist_index=<value
optimized out>,
ost_table=<value optimized out>, nb_ostreams=1,
pkt=0xbfffeab4)
at ffmpeg.c:1643
#11 0x0807e2d4 in transcode (nb_output_files=<value optimized
out>,
nb_input_files=<value optimized out>, stream_maps=<value
optimized out>,
nb_stream_maps=0, input_files=<value optimized out>,
output_files=<value optimized out>) at ffmpeg.c:2577
#12 0x0807f339 in main (argc=9, argv=0xbffff8f4) at ffmpeg.c:4245
(gdb) disass $pc-32,$pc+32
Dump of assembler code from 0x846f269 to 0x846f2a9:
0x0846f269 <sad16_sse2+9>: mov 0x18(%esp),%edx
0x0846f26d <sad16_sse2+13>: mov 0x14(%esp),%eax
0x0846f271 <sad16_sse2+17>: pxor %xmm2,%xmm2
0x0846f275 <sad16_sse2+21>: lea 0x0(%esi,%eiz,1),%esi
0x0846f279 <sad16_sse2+25>: lea 0x0(%edi,%eiz,1),%edi
0x0846f280 <sad16_sse2+32>: movdqu (%ecx),%xmm0
0x0846f284 <sad16_sse2+36>: movdqu (%ecx,%eax,1),%xmm1
=> 0x0846f289 <sad16_sse2+41>: psadbw (%ebx),%xmm0
0x0846f28d <sad16_sse2+45>: psadbw (%ebx,%eax,1),%xmm1
0x0846f292 <sad16_sse2+50>: paddw %xmm0,%xmm2
0x0846f296 <sad16_sse2+54>: paddw %xmm1,%xmm2
0x0846f29a <sad16_sse2+58>: lea (%ecx,%eax,2),%ecx
0x0846f29d <sad16_sse2+61>: lea (%ebx,%eax,2),%ebx
0x0846f2a0 <sad16_sse2+64>: sub $0x2,%edx
0x0846f2a3 <sad16_sse2+67>: jg 0x846f280 <sad16_sse2+32>
0x0846f2a5 <sad16_sse2+69>: movhlps %xmm2,%xmm0
0x0846f2a8 <sad16_sse2+72>: paddw %xmm0,%xmm2
End of assembler dump.
(gdb) info all-registers
eax 0x380 896
ecx 0xb7bb3386 -1212468346
edx 0x10 16
ebx 0xb7a2f386 -1214057594
esp 0xbfff41c8 0xbfff41c8
ebp 0x8 0x8
esi 0xb7a2f386 -1214057594
edi 0x0 0
eip 0x846f289 0x846f289 <sad16_sse2+41>
eflags 0x210282 [ SF IF RF ID ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
st0 -nan(0x8000800080008) (raw
0xffff0008000800080008)
st1 -nan(0x8000800080008) (raw
0xffff0008000800080008)
st2 -nan(0xa400a400a400a4) (raw
0xffff00a400a400a400a4)
st3 -nan(0xa400a400a400a4) (raw
0xffff00a400a400a400a4)
st4 -nan(0x1420142013e013a) (raw
0xffff01420142013e013a)
st5 -nan(0x142014201420142) (raw
0xffff0142014201420142)
st6 -nan(0x0000001e2) (raw
0xffff00000000000001e2)
st7 -inf (raw 0xffff0000000000000000)
fctrl 0x37f 895
fstat 0x4020 16416
ftag 0xaaaa 43690
fiseg 0x73 115
fioff 0x82e557d 137254269
foseg 0x7b 123
fooff 0xbfffe498 -1073748840
fop 0x1c9 457
xmm0 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double =
{0x0, 0x0},
v16_int8 = {0xb, 0xb, 0xc, 0xc, 0xd, 0xd, 0xd, 0xe, 0xe, 0xf,
0xf, 0x10,
0x10, 0x10, 0x10, 0x10}, v8_int16 = {0xb0b, 0xc0c, 0xd0d,
0xe0d, 0xf0e,
0x100f, 0x1010, 0x1010}, v4_int32 = {0xc0c0b0b, 0xe0d0d0d,
0x100f0f0e,
0x10101010}, v2_int64 = {0xe0d0d0d0c0c0b0b,
0x10101010100f0f0e},
uint128 = 0x10101010100f0f0e0e0d0d0d0c0c0b0b}
xmm1 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double =
{0x0, 0x0},
v16_int8 = {0xb, 0xb, 0xc, 0xc, 0xc, 0xd, 0xe, 0xe, 0xf, 0xf,
0xf, 0x10,
0x10, 0x10, 0x10, 0x10}, v8_int16 = {0xb0b, 0xc0c, 0xd0c,
0xe0e, 0xf0f,
0x100f, 0x1010, 0x1010}, v4_int32 = {0xc0c0b0b, 0xe0e0d0c,
0x100f0f0f,
0x10101010}, v2_int64 = {0xe0e0d0c0c0c0b0b,
0x10101010100f0f0f},
uint128 = 0x10101010100f0f0f0e0e0d0c0c0c0b0b}
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 = {0x84, 0x0, 0x84, 0x0, 0x84, 0x0, 0x84, 0x0, 0x84,
0x0, 0x84,
0x0, 0x84, 0x0, 0x84, 0x0}, v8_int16 = {0x84, 0x84, 0x84,
0x84, 0x84,
0x84, 0x84, 0x84}, v4_int32 = {0x840084, 0x840084, 0x840084,
0x840084},
v2_int64 = {0x84008400840084, 0x84008400840084},
uint128 = 0x00840084008400840084008400840084}
xmm6 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double =
{0x0, 0x0},
v16_int8 = {0x7c, 0x0, 0x7c, 0x0, 0x7c, 0x0, 0x7c, 0x0, 0x7c,
0x0, 0x7c,
0x0, 0x7c, 0x0, 0x7c, 0x0}, v8_int16 = {0x7c, 0x7c, 0x7c,
0x7c, 0x7c,
0x7c, 0x7c, 0x7c}, v4_int32 = {0x7c007c, 0x7c007c, 0x7c007c,
0x7c007c},
v2_int64 = {0x7c007c007c007c, 0x7c007c007c007c},
uint128 = 0x007c007c007c007c007c007c007c007c}
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 = 0x8000800080008, v2_int32 = {0x80008,
0x80008},
v4_int16 = {0x8, 0x8, 0x8, 0x8}, v8_int8 = {0x8, 0x0, 0x8, 0x0,
0x8, 0x0,
0x8, 0x0}}
mm1 {uint64 = 0x8000800080008, v2_int32 = {0x80008,
0x80008},
v4_int16 = {0x8, 0x8, 0x8, 0x8}, v8_int8 = {0x8, 0x0, 0x8, 0x0,
0x8, 0x0,
0x8, 0x0}}
mm2 {uint64 = 0xa400a400a400a4, v2_int32 = {0xa400a4,
0xa400a4},
v4_int16 = {0xa4, 0xa4, 0xa4, 0xa4}, v8_int8 = {0xa4, 0x0,
0xa4, 0x0, 0xa4,
0x0, 0xa4, 0x0}}
mm3 {uint64 = 0xa400a400a400a4, v2_int32 = {0xa400a4,
0xa400a4},
v4_int16 = {0xa4, 0xa4, 0xa4, 0xa4}, v8_int8 = {0xa4, 0x0,
0xa4, 0x0, 0xa4,
0x0, 0xa4, 0x0}}
mm4 {uint64 = 0x1420142013e013a, v2_int32 =
{0x13e013a, 0x1420142},
v4_int16 = {0x13a, 0x13e, 0x142, 0x142}, v8_int8 = {0x3a, 0x1,
0x3e, 0x1,
0x42, 0x1, 0x42, 0x1}}
mm5 {uint64 = 0x142014201420142, v2_int32 =
{0x1420142, 0x1420142},
v4_int16 = {0x142, 0x142, 0x142, 0x142}, v8_int8 = {0x42, 0x1,
0x42, 0x1,
0x42, 0x1, 0x42, 0x1}}
mm6 {uint64 = 0x1e2, v2_int32 = {0x1e2, 0x0}, v4_int16
= {0x1e2,
0x0, 0x0, 0x0}, v8_int8 = {0xe2, 0x1, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0}}
mm7 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 =
{0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0}}
BTW, I think the instructions at
http://ffmpeg.org/bugreports.html are slightly wrong about the
"disass" command
----------
messages: 12496
priority: normal
status: new
substatus: new
title: Crash when encoding mpeg4 video with B frames at 854x480
type: bug
________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2349>
________________________________________________