[Ffmpeg-devel] [Ffmpeg-devel-old] Segfaults when streaming

Adam K Kirchhoff adamk
Wed Aug 3 20:45:47 CEST 2005


Hello all,

    I'm trying to get ffserver and ffmpeg to stream live video from my 
brooktree card, but I'm running into some problems.

    ffmpeg is from cvs (late last week), and was configured with 
"--enable-mp3lame --enable-xvid --enable-faad --enable-faac 
--enable-libogg --enable-gpl --enable-vorbis".  It built without problems.

    I'm using the ffserver.conf file from the doc directory, but have 
commented out all streams except for the mpeg one (I'm attaching my 
ffserver.conf file, just in case).  I start up ffserver without any 
problems.  When I go try to send a feed to the server, this is what I get:

[ adamk at thorn - ~ ]: ffmpeg http://localhost:8090/feed1.ffm 
ffmpeg version CVS, build 4759, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --enable-mp3lame --enable-xvid --enable-faad 
--enable-faac --enable-libogg --enable-gpl --enable-vorbis
  built on Aug  3 2005 14:07:46, gcc: 3.3.4
Input #0, video4linux, from '':
  Duration: N/A, bitrate: N/A
  Stream #0.0: Video: rawvideo, yuv420p, 320x240, 3.00 fps
Input #1, audio_device, from '':
  Duration: N/A, bitrate: N/A
  Stream #1.0: Audio: pcm_s16le, 44100 Hz, mono, 705 kb/s
picture size invalid (0x236)
Segmentation fault

Run through gdb:

[ adamk at thorn - ~/saved/source/ffmpeg ]: gdb ./ffmpeg_g
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-slackware-linux"...Using host 
libthread_db library "/lib/libthread_db.so.1".

(gdb) set args http://localhost:8090/feed1.ffm
(gdb) run
Starting program: /home/adamk/saved/source/ffmpeg/ffmpeg_g 
http://localhost:8090/feed1.ffm
ffmpeg version CVS, build 4759, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --enable-mp3lame --enable-xvid --enable-faad 
--enable-faac --enable-libogg --enable-gpl --enable-vorbis
  built on Aug  3 2005 14:07:46, gcc: 3.3.4
Input #0, video4linux, from '':
  Duration: N/A, bitrate: N/A
  Stream #0.0: Video: rawvideo, yuv420p, 320x240, 3.00 fps
Input #1, audio_device, from '':
  Duration: N/A, bitrate: N/A
  Stream #1.0: Audio: pcm_s16le, 44100 Hz, mono, 705 kb/s
picture size invalid (0x236)

Program received signal SIGSEGV, Segmentation fault.
0xb7bc828a in img_resample_close () from /usr/local/lib/libavcodec.so
(gdb) bt
#0  0xb7bc828a in img_resample_close () from /usr/local/lib/libavcodec.so
#1  0x0804bc3f in av_encode (output_files=0x805aa40, nb_output_files=1, 
input_files=0x805a940, nb_input_files=2, stream_maps=0x805aaa0,
    nb_stream_maps=0) at ffmpeg.c:2165
#2  0x0804a821 in main (argc=8998, argv=0xbfe76724) at ffmpeg.c:4491
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0xb7bc826a to 0xb7bc82aa:
0xb7bc826a <img_resample+186>:  decl   0x5e5bf465(%ebp)
0xb7bc8270 <img_resample+192>:  pop    %edi
0xb7bc8271 <img_resample+193>:  pop    %ebp
0xb7bc8272 <img_resample+194>:  ret   
0xb7bc8273 <img_resample+195>:  lea    0x0(%esi),%esi
0xb7bc8279 <img_resample+201>:  lea    0x0(%edi),%edi
0xb7bc8280 <img_resample_close+0>:      push   %ebp
0xb7bc8281 <img_resample_close+1>:      mov    %esp,%ebp
0xb7bc8283 <img_resample_close+3>:      push   %ebx
0xb7bc8284 <img_resample_close+4>:      sub    $0x10,%esp
0xb7bc8287 <img_resample_close+7>:      mov    0x8(%ebp),%ebx
0xb7bc828a <img_resample_close+10>:     mov    0x140(%ebx),%edx
0xb7bc8290 <img_resample_close+16>:     push   %edx
0xb7bc8291 <img_resample_close+17>:     call   0xb7abd940 <av_free>
0xb7bc8296 <img_resample_close+22>:     mov    %ebx,0x8(%ebp)
0xb7bc8299 <img_resample_close+25>:     add    $0x10,%esp
0xb7bc829c <img_resample_close+28>:     mov    0xfffffffc(%ebp),%ebx
0xb7bc829f <img_resample_close+31>:     mov    %ebp,%esp
0xb7bc82a1 <img_resample_close+33>:     pop    %ebp
0xb7bc82a2 <img_resample_close+34>:     jmp    0xb7abd940 <av_free>
0xb7bc82a7 <img_resample_close+39>:     mov    %esi,%esi
0xb7bc82a9 <img_resample_close+41>:     lea    0x0(%edi),%edi
End of assembler dump.
eax            0x1      1
ecx            0x806ae84        134655620
edx            0x0      0
ebx            0x0      0
esp            0xbfe76024       0xbfe76024
ebp            0xbfe76038       0xbfe76038
esi            0x0      0
edi            0x806ad70        134655344
eip            0xb7bc828a       0xb7bc828a
eflags         0x10286  66182
cs             0x73     115
ss             0x7b     123
ds             0x7b     123
es             0x7b     123
fs             0x0      0
gs             0x0      0
st0            0        (raw 0x00000000000000000000)
st1            0        (raw 0x00000000000000000000)
st2            0        (raw 0x00000000000000000000)
st3            0        (raw 0x00000000000000000000)
st4            21.994216536704321640627313172444701     (raw 
0x4003aff427ccb24cb000)
st5            16       (raw 0x40038000000000000000)
st6            -5.4564792608687668826195071858364827e-12        (raw 
0xbfd9bffb988f00000000)
st7            32768    (raw 0x400e8000000000000000)
fctrl          0x37f    895
fstat          0x32     50
ftag           0xffff   65535
fiseg          0x73     115
fioff          0xb7ae9c43       -1213293501
foseg          0x7b     123
fooff          0xbfe75f40       -1075355840
fop            0x1c9    457
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, 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 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 
0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm1            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 
0x0, 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 = 0xaff427ccb24cb000, v2_int32 = {0xb24cb000, 
0xaff427cc}, v4_int16 = {0xb000, 0xb24c, 0x27cc, 0xaff4}, v8_int8 = {
    0x0, 0xb0, 0x4c, 0xb2, 0xcc, 0x27, 0xf4, 0xaf}}
mm5            {uint64 = 0x8000000000000000, v2_int32 = {0x0, 
0x80000000}, v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x80}}
mm6            {uint64 = 0xbffb988f00000000, v2_int32 = {0x0, 
0xbffb988f}, v4_int16 = {0x0, 0x0, 0x988f, 0xbffb}, v8_int8 = {0x0, 0x0, 
0x0,
    0x0, 0x8f, 0x98, 0xfb, 0xbf}}
mm7            {uint64 = 0x8000000000000000, v2_int32 = {0x0, 
0x80000000}, v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x80}}

I've also tried modifying ffserver.conf so, uncommenting the NoVideo 
line.  This time I get something different:

(gdb) set args http://localhost:8090/feed1.ffm
(gdb) run
Starting program: /home/adamk/saved/source/ffmpeg/ffmpeg_g 
http://localhost:8090/feed1.ffm
ffmpeg version CVS, build 4759, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --enable-mp3lame --enable-xvid --enable-faad 
--enable-faac --enable-libogg --enable-gpl --enable-vorbis
  built on Aug  3 2005 14:07:46, gcc: 3.3.4
Input #0, audio_device, from '':
  Duration: N/A, bitrate: N/A
  Stream #0.0: Audio: pcm_s16le, 44100 Hz, mono, 705 kb/s
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
  Stream #0.0: Audio: mp2, 44100 Hz, mono
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding

Program received signal SIGSEGV, Segmentation fault.
0x0804b810 in av_encode (output_files=0x805aa40, nb_output_files=1, 
input_files=0x805a940, nb_input_files=1, stream_maps=0x805aaa0,
    nb_stream_maps=0) at ffmpeg.c:2028
2028                if(ost->frame_number >= 
max_frames[ost->st->codec->codec_type]){
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x804b7f0 to 0x804b830:
0x0804b7f0 <av_encode+2400>:    inc    %ebp
0x0804b7f1 <av_encode+2401>:    jne    0x804bf10 <av_encode+4224>
0x0804b7f7 <av_encode+2407>:    test   %ebx,%ebx
0x0804b7f9 <av_encode+2409>:    fstpl  0xfffffa80(%ebp)
0x0804b7ff <av_encode+2415>:    jne    0x804b807 <av_encode+2423>
0x0804b801 <av_encode+2417>:    mov    %edx,0xfffffa98(%ebp)
0x0804b807 <av_encode+2423>:    mov    0x8(%ecx),%edi
0x0804b80a <av_encode+2426>:    mov    0xe0(%edi),%edx
0x0804b810 <av_encode+2432>:    mov    0x805a5a8(,%edx,4),%esi
0x0804b817 <av_encode+2439>:    mov    0xfffffac0(%ebp),%ecx
0x0804b81d <av_encode+2445>:    cmp    %esi,0x14(%ecx)
0x0804b820 <av_encode+2448>:    jge    0x804b9c6 <av_encode+2870>
0x0804b826 <av_encode+2454>:    incl   0xfffffad8(%ebp)
0x0804b82c <av_encode+2460>:    mov    0xfffffac8(%ebp),%eax
End of assembler dump.

I'll spare you from the all-registers info this time, but let me know if 
you'd like me to send it along.

Any help would be appreciated.  Thanks!

Adam

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffserver.conf
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050803/62e8ab52/attachment.txt>



More information about the ffmpeg-devel mailing list