[MPlayer-users] Crash when multi-threaded video decoding enabled

Tibor Simko tibsi1 at gmail.com
Sun Mar 27 14:03:26 CEST 2011


Hello,

I have problem with multi-threaded video decoding.
When I use -lavdopts threads=2 (or more threads), mplayer crashes. It works
OK if -lavdopts threads=1.
This appeared with the latest source snapshot (2011-03-27). I have older
snapshots and they work fine. May this be related to ffmpeg-mt?
Bug report below.
Thanks.

Tibor


gdb --args ./mplayer -cache 10240 -vo vdpau:deint=3 -ao alsa -vc
ffh264vdpau,ffodivxvdpau,ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau
rtp://@232.232.64.255:5004 -slave -identify -cache-min 30 -softvol-max
400 -softvol -tsprobe 716800 -mc 1 -osdlevel 0 -nofs -lavdopts
threads=2
GNU gdb (GDB) Fedora (7.2-41.fc14)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/tibor/sources/mplayer/mplayer...done.
(gdb) start
Temporary breakpoint 1 at 0x80a7b9f: file mplayer.c, line 2713.
Starting program: /home/tibor/sources/mplayer/mplayer -cache 10240 -vo
vdpau:deint=3 -ao alsa -vc
ffh264vdpau,ffodivxvdpau,ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau
rtp://@232.232.64.255:5004 -slave -identify -cache-min 30 -softvol-max
400 -softvol -tsprobe 716800 -mc 1 -osdlevel 0 -nofs -lavdopts
threads=2
[Thread debugging using libthread_db enabled]

Temporary breakpoint 1, main (argc=26, argv=0xbfffefe4) at mplayer.c:2713
2713    int main(int argc,char* argv[]){
Missing separate debuginfos, use: debuginfo-install
alsa-lib-1.0.24-1.fc14.i686 bzip2-libs-1.0.6-1.fc14.1.i686
expat-2.0.1-10.fc13.i686 faad2-libs-2.7-1.fc11.i586
fontconfig-2.8.0-2.fc14.i686 freetype-2.4.2-4.fc14.i686
giflib-4.1.6-3.fc14.i686 glibc-2.13-1.i686 lcms-libs-1.19-2.fc14.i686
libICE-1.0.6-2.fc13.i686 libSM-1.1.0-7.fc12.i686
libX11-1.3.4-3.fc14.i686 libXScrnSaver-1.2.0-1.fc12.i686
libXau-1.0.6-1.fc14.i686 libXext-1.1.2-2.fc14.i686
libXv-1.0.5-1.fc13.i686 libXvMC-1.0.5-1.fc13.i686
libdvdnav-4.1.4-0.1.svn1184.fc12.i686
libdvdread-4.1.4-0.2.svn1188.fc13.i686 libgcc-4.5.1-4.fc14.i686
libjpeg-turbo-1.0.1-1.fc14.1.i686 libmng-1.0.10-4.fc12.i686
libmpeg2-0.5.1-8.fc12.i686 libogg-1.2.0-1.fc14.i686
libpng-1.2.44-1.fc14.i686 libtheora-1.1.1-1.fc13.i686
libuuid-2.18-4.8.fc14.i686 libvdpau-0.4.1-1.fc14.1.i686
libvorbis-1.3.1-2.fc14.i686 libxcb-1.7-1.fc14.i686
xvidcore-1.2.2-2.fc14.i686 zlib-1.2.5-2.fc14.i686
(gdb) continue
Continuing.
MPlayer SVN-r33126-4.5.1 (C) 2000-2011 MPlayer Team

Playing rtp://@232.232.64.255:5004.
STREAM_RTP, URL: rtp://@232.232.64.255:5004
Detaching after fork from child process 19494.
Cache fill: 29.93% (3138660 bytes)

TS file format detected.
PROGRAM_ID=8001 (0x1F41), PMT_PID: 801(0x321)
PROGRAM_ID=8001 (0x1F41), PMT_PID: 801(0x321)
VIDEO MPEG2(pid=401) AUDIO MPA(pid=1601) SUB Teletext(pid=1841)  PROGRAM N. 8001
ID_VIDEO_ID=401
ID_AUDIO_ID=1601
ID_AID_1601_LANG=mis
ID_SUBTITLE_ID=1841
ID_SID_1841_LANG=SLO
ID_AUDIO_ID=561
ID_AID_561_LANG=slo
ID_AUDIO_ID=641
ID_AID_641_LANG=mul
PROGRAM_ID=8001 (0x1F41), PMT_PID: 801(0x321)
VIDEO:  MPEG2  720x576  (aspect 3)  25.000 fps  4700.0 kbps (587.5 kbyte/s)
ID_FILENAME=rtp://@232.232.64.255:5004
ID_DEMUXER=mpegts
ID_VIDEO_FORMAT=0x10000002
ID_VIDEO_BITRATE=4700000
ID_VIDEO_WIDTH=720
ID_VIDEO_HEIGHT=576
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=80
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_START_TIME=86320.83
ID_LENGTH=-0.02
ID_SEEKABLE=0
ID_CHAPTERS=0
==========================================================================
Forced video codec: ffh264vdpau
Forced video codec: ffodivxvdpau
Forced video codec: ffmpeg12vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[New Thread 0xb71adb70 (LWP 19495)]
[New Thread 0xb69acb70 (LWP 19496)]
Selected video codec: [ffmpeg12vdpau] vfm: ffmpeg (FFmpeg MPEG-1/2 (VDPAU))
==========================================================================
ID_VIDEO_CODEC=ffmpeg12vdpau
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
ID_AUDIO_BITRATE=192000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
[New Thread 0xb21aab70 (LWP 19497)]
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=mp3
Starting playback...
PROGRAM_ID=8001 (0x1F41), PMT_PID: 801(0x321)
[VD_FFMPEG] XVMC-accelerated MPEG-2.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
ID_VIDEO_ASPECT=1.7778
VO: [vdpau] 720x576 => 1024x576 MPEG2 VDPAU acceleration
[mpegvideo_vdpau @ 0x86d51a0]invalid mb type in I Frame at 29 0
[mpegvideo_vdpau @ 0x86d51a0]ac-tex damaged at 0 18

Program received signal SIGSEGV, Segmentation fault.
slice_decode_thread (c=0x8c72a40, arg=0x8c7316c) at mpeg12.c:1903
1903        const int field_pic= s->picture_structure != PICT_FRAME;
Missing separate debuginfos, use: debuginfo-install
alsa-plugins-pulseaudio-1.0.22-1.fc13.i686 dbus-libs-1.4.0-2.fc14.i686
flac-1.2.1-6.fc12.i686 libXcursor-1.1.10-5.fc14.i686
libXfixes-4.0.5-1.fc14.i686 libXi-1.3.2-1.fc14.i686
libXrender-0.9.6-1.fc14.i686 libXtst-1.0.99.2-3.fc12.i686
libasyncns-0.8-1.fc13.i686 libsndfile-1.0.23-1.fc14.i686
pulseaudio-libs-0.9.21-7.fc14.i686 tcp_wrappers-libs-7.6-59.fc14.i686
(gdb) bt
#0  slice_decode_thread (c=0x8c72a40, arg=0x8c7316c) at mpeg12.c:1903
#1  0x083c8ae5 in avcodec_default_execute (c=0x8c72a40, func=0x8318300
<slice_decode_thread>, arg=0x8c73164, ret=0x0,
    count=36, size=4) at utils.c:433
#2  0x08371c0d in avcodec_thread_execute (avctx=0x8c72a40,
func=0x8318300 <slice_decode_thread>, arg=0x8c73164, ret=0x0,
    job_count=36, job_size=4) at pthread.c:194
#3  0x08317605 in decode_chunks (avctx=0x8c72a40, picture=0x8c72940,
data_size=0xbfffcd4c, buf=0xb72bb008 "", buf_size=85860)
    at mpeg12.c:2311
#4  0x08318b45 in mpeg_decode_frame (avctx=0x8c72a40, data=0x8c72940,
data_size=0xbfffcd4c, avpkt=0xbfffccf8)
    at mpeg12.c:2288
#5  0x083c92c6 in avcodec_decode_video2 (avctx=0x8c72a40,
picture=0x8c72940, got_picture_ptr=0xbfffcd4c, avpkt=0xbfffccf8)
    at utils.c:708
#6  0x0819c07f in decode (sh=0x8c32a60, data=0xb72bb008, len=85860,
flags=0) at libmpcodecs/vd_ffmpeg.c:841
#7  0x080ebe1d in decode_video (sh_video=0x8c32a60, start=0xb72bb008
"", in_size=85860, drop_frame=0,
    pts=0.039999999105930328, full_frame=0xbfffce2c) at
libmpcodecs/dec_video.c:392
#8  0x080a558d in update_video (blit_frame=0xbfffef14) at mplayer.c:2397
#9  0x080aa1f4 in main (argc=26, argv=0xbfffefe4) at mplayer.c:3714
(gdb) disass $pc-32,$pc+32
Dump of assembler code from 0x83182ee to 0x831832e:
   0x083182ee <decode_chunks+10318>:    jge    0x831827e <decode_chunks+10206>
   0x083182f0 <decode_chunks+10320>:    jmp    0x8318004 <decode_chunks+9572>
   0x083182f5:  lea    0x0(%esi,%eiz,1),%esi
   0x083182f9:  lea    0x0(%edi,%eiz,1),%edi
   0x08318300 <slice_decode_thread+0>:  push   %ebp
   0x08318301 <slice_decode_thread+1>:  mov    %esp,%ebp
   0x08318303 <slice_decode_thread+3>:  push   %edi
   0x08318304 <slice_decode_thread+4>:  push   %esi
   0x08318305 <slice_decode_thread+5>:  push   %ebx
   0x08318306 <slice_decode_thread+6>:  sub    $0x4c,%esp
   0x08318309 <slice_decode_thread+9>:  mov    0xc(%ebp),%eax
   0x0831830c <slice_decode_thread+12>: mov    (%eax),%ebx
=> 0x0831830e <slice_decode_thread+14>: cmpl   $0x3,0x2798(%ebx)
   0x08318315 <slice_decode_thread+21>: mov    0x31c(%ebx),%edx
   0x0831831b <slice_decode_thread+27>: mov    0x2764(%ebx),%eax
   0x08318321 <slice_decode_thread+33>: setne  %cl
   0x08318324 <slice_decode_thread+36>: mov    %ecx,%edi
   0x08318326 <slice_decode_thread+38>: movzbl %cl,%ecx
   0x08318329 <slice_decode_thread+41>: mov    %ecx,-0x2c(%ebp)
   0x0831832c <slice_decode_thread+44>: mov    0x80(%ebx),%ecx
End of assembler dump.
(gdb) info all-registers
eax            0x8c7316c        147272044
ecx            0x0      0
edx            0xffffffff       -1
ebx            0x0      0
esp            0xbfffc970       0xbfffc970
ebp            0xbfffc9c8       0xbfffc9c8
esi            0x8c7316c        147272044
edi            0x0      0
eip            0x831830e        0x831830e <slice_decode_thread+14>
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            0.40809415350965494440060865599662066    (raw
0x3ffdd0f1b786068a0000)
st1            0        (raw 0x00000000000000000000)
st2            2.017199993133544921875  (raw 0x40008119ce0000000000)
st3            0        (raw 0x00000000000000000000)
st4            -1.012555350552446498113567940890789     (raw
0xbfff819b69ea019c0000)
st5            -0.073060395316715265323637140681967139  (raw
0xbffb95a0b044251e0000)
st6            -0       (raw 0x80000000000000000000)
st7            -1.0856157458691617634372050815727562    (raw
0xbfff8af574ee43ede000)
fctrl          0x37f    895
fstat          0x320    800
ftag           0xffff   65535
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,
0x8000000000000000}, v16_int8 = {0x4d, 0x50, 0x6c, 0x61,
    0x79, 0x65, 0x72, 0x0, 0x73, 0x65, 0x6d, 0x69, 0x63, 0x6f, 0x6c,
0x6f}, v8_int16 = {0x504d, 0x616c, 0x6579, 0x72,
---Type <return> to continue, or q <return> to quit---
    0x6573, 0x696d, 0x6f63, 0x6f6c}, v4_int32 = {0x616c504d, 0x726579,
0x696d6573, 0x6f6c6f63}, v2_int64 = {
    0x726579616c504d, 0x6f6c6f63696d6573}, uint128 =
0x6f6c6f63696d657300726579616c504d}
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   [ IM DM ZM OM UM PM ]
mm0            {uint64 = 0xd0f1b786068a0000, v2_int32 = {0x68a0000,
0xd0f1b786}, v4_int16 = {0x0, 0x68a, 0xb786, 0xd0f1},
  v8_int8 = {0x0, 0x0, 0x8a, 0x6, 0x86, 0xb7, 0xf1, 0xd0}}
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 = 0x8119ce0000000000, v2_int32 = {0x0,
0x8119ce00}, v4_int16 = {0x0, 0x0, 0xce00, 0x8119}, v8_int8 = {
    0x0, 0x0, 0x0, 0x0, 0x0, 0xce, 0x19, 0x81}}
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 = 0x819b69ea019c0000, v2_int32 = {0x19c0000,
0x819b69ea}, v4_int16 = {0x0, 0x19c, 0x69ea, 0x819b},
  v8_int8 = {0x0, 0x0, 0x9c, 0x1, 0xea, 0x69, 0x9b, 0x81}}
mm5            {uint64 = 0x95a0b044251e0000, v2_int32 = {0x251e0000,
0x95a0b044}, v4_int16 = {0x0, 0x251e, 0xb044, 0x95a0},
  v8_int8 = {0x0, 0x0, 0x1e, 0x25, 0x44, 0xb0, 0xa0, 0x95}}
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 = 0x8af574ee43ede000, v2_int32 = {0x43ede000,
0x8af574ee}, v4_int16 = {0xe000, 0x43ed, 0x74ee,
    0x8af5}, v8_int8 = {0x0, 0xe0, 0xed, 0x43, 0xee, 0x74, 0xf5, 0x8a}}


More information about the MPlayer-users mailing list