[Ffmpeg-devel] mpeg2 segdefault
matthieu castet
castet.matthieu
Fri May 27 21:25:18 CEST 2005
Hi,
playing a mpeg2 stream work fine with ffplay, but ffmpeg segdefault when
trying to transcoding to mpeg1 or mpeg2 (no segdefault if transcoding to
mpeg4).
(gdb) r -i /tmp/p.vob test.mpg
Starting program: /home/mat/appli/matroska/ffmpeg/ffmpeg_g -i /tmp/p.vob
test.mpg
ffmpeg version 0.4.9-pre1, build 4755, Copyright (c) 2000-2004 Fabrice
Bellard
configuration: --prefix=/usr/local/stow/ffmpegcvs/
built on May 21 2005 11:02:50, gcc: 3.3.6 (Debian 1:3.3.6-5)
Input #0, mpeg, from '/tmp/p.vob':
Duration: 00:00:00.0, start: 0.287267, bitrate: 1979573 kb/s
Stream #0.0: Video: mpeg2video, yuv420p, 720x576, 25.00 fps, 8000 kb/s
File 'test.mpg' already exists. Overwrite ? [y/N] y
Output #0, mpeg, to 'test.mpg':
Stream #0.0: Video: mpeg1video, yuv420p, 720x576, 25.00 fps, q=2-31,
200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
Program received signal SIGSEGV, Segmentation fault.
0x082f7bbc in dct_unquantize_mpeg2_inter_mmx (s=0x83ec0f0, block=0x841e020,
n=63, qscale=6) at i386/mpegvideo_mmx.c:411
411 else nCoeffs= s->intra_scantable.raster_end[
s->block_last_index[n] ];
(gdb) bt
#0 0x082f7bbc in dct_unquantize_mpeg2_inter_mmx (s=0x83ec0f0,
block=0x841e020, n=63, qscale=6) at i386/mpegvideo_mmx.c:411
#1 0x080c8b65 in encode_thread (c=0x83e3d88, arg=0x83ec0f0)
at mpegvideo.c:3591
#2 0x080af143 in avcodec_default_execute (c=0x83e3d88,
func=0x80c3300 <encode_thread>, arg=0x83ec1b4, ret=0x0, count=1)
at utils.c:423
#3 0x080b72ac in encode_picture (s=0x83ec0f0, picture_number=0)
at mpegvideo.c:5446
#4 0x080b594e in MPV_encode_picture (avctx=0x83e3d88, buf=0xb7cd5020 "",
buf_size=1658880, data=0x3f) at mpegvideo.c:2339
#5 0x080af2ce in avcodec_encode_video (avctx=0x83e3d88,
buf=0x3f <Address 0x3f out of bounds>, buf_size=1658880,
pict=0xbfffeda0)
at utils.c:584
#6 0x0805d2b0 in do_video_out (s=0x83e2e10, ost=0x83e1580, ist=0x83e14e0,
in_picture=0xbffff1b0, frame_size=0xbffff0b0) at ffmpeg.c:910
#7 0x0805bec6 in output_packet (ist=0x83e14e0, ist_index=0,
ost_table=0x83e1530, nb_ostreams=1, pkt=0xbffff3b0) at ffmpeg.c:1277
#8 0x08055614 in av_encode (output_files=0x837fc60, nb_output_files=1,
input_files=0x837fb60, nb_input_files=1, stream_maps=0x837fcc0,
nb_stream_maps=0) at ffmpeg.c:1949
#9 0x08054361 in main (argc=103984, argv=0x3f) at ffmpeg.c:4231
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x82f7b9c to 0x82f7bdc:
0x082f7b9c <dct_unquantize_mpeg2_inter_mmx+12>: dec %ebp
0x082f7b9d <dct_unquantize_mpeg2_inter_mmx+13>: or %cl,0x8b042474(%ecx)
0x082f7ba3 <dct_unquantize_mpeg2_inter_mmx+19>: jne 0x82f7bb9
<dct_unquantize_mpeg2_inter_mmx+41>
0x082f7ba5 <dct_unquantize_mpeg2_inter_mmx+21>: mov %ebx,(%esp)
0x082f7ba8 <dct_unquantize_mpeg2_inter_mmx+24>: mov 0x1b90(%ecx),%edx
0x082f7bae <dct_unquantize_mpeg2_inter_mmx+30>: test %edx,%edx
0x082f7bb0 <dct_unquantize_mpeg2_inter_mmx+32>: jne 0x82f7bc4
<dct_unquantize_mpeg2_inter_mmx+52>
0x082f7bb2 <dct_unquantize_mpeg2_inter_mmx+34>: mov 0x10(%ebp),%ebx
0x082f7bb5 <dct_unquantize_mpeg2_inter_mmx+37>: mov
0x1514(%ecx,%ebx,4),%edx
0x082f7bbc <dct_unquantize_mpeg2_inter_mmx+44>: movzbl
0x158c(%ecx,%edx,1),%eax
0x082f7bc4 <dct_unquantize_mpeg2_inter_mmx+52>: mov 0xc(%ebp),%ebx
0x082f7bc7 <dct_unquantize_mpeg2_inter_mmx+55>: lea (%eax,%eax,1),%edx
0x082f7bca <dct_unquantize_mpeg2_inter_mmx+58>: lea
0x13c0(%edx,%ecx,1),%ecx
0x082f7bd1 <dct_unquantize_mpeg2_inter_mmx+65>: add %edx,%ebx
0x082f7bd3 <dct_unquantize_mpeg2_inter_mmx+67>: neg %edx
0x082f7bd5 <dct_unquantize_mpeg2_inter_mmx+69>: pcmpeqw %mm7,%mm7
0x082f7bd8 <dct_unquantize_mpeg2_inter_mmx+72>: psrlq $0x30,%mm7
End of assembler dump.
(gdb) info all-registers
eax 0x3f 63
ecx 0x83ec0f0 138330352
edx 0x8404430 138429488
ebx 0x0 0
esp 0xbfff4dd0 0xbfff4dd0
ebp 0xbfff4dd8 0xbfff4dd8
esi 0x6 6
edi 0x841e020 138534944
eip 0x82f7bbc 0x82f7bbc
eflags 0x210246 2163270
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
st0 -nan(0x1000000010000) (raw 0xffff0001000000010000)
st1 <invalid float value> (raw 0xffff0000000000000000)
st2 <invalid float value> (raw 0xffff0000000000000000)
st3 <invalid float value> (raw 0xffff0000000000000000)
st4 <invalid float value> (raw 0xffff0000000000000000)
st5 <invalid float value> (raw 0xffff0000000000000000)
st6 <invalid float value> (raw 0xffff0000000000000000)
---Type <return> to continue, or q <return> to quit---
st7 <invalid float value> (raw 0xffff0000000000000000)
fctrl 0x37f 895
fstat 0x120 288
ftag 0xaaaa 43690
fiseg 0x0 0
fioff 0x0 0
foseg 0x0 0
fooff 0x0 0
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 = {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,
---Type <return> to continue, or q <return> to quit---
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 = 0x1000000010000, v2_int32 = {0x10000, 0x10000},
v4_int16 = {0x0, 0x1, 0x0, 0x1}, v8_int8 = {0x0, 0x0, 0x1, 0x0, 0x0,
0x0,
0x1, 0x0}}
mm1 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
---Type <return> to continue, or q <return> to quit---
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm2 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm3 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm4 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
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 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 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}}
the stream may be still at
ftp://ftp.mplayerhq.hu/MPlayer/incoming/mpeg2_demux_bug.{vob,txt} if it
weren't removed.
Matthieu
More information about the ffmpeg-devel
mailing list