[MPlayer-users] Segfault with -vf scale and -brightness/-contrast/-hue/-saturation

Anssi Saari as at sci.fi
Tue Jul 22 22:41:33 CEST 2003


I just run into this problem recently, I had an apparently broken video
clip which looked about like 4:3 picture streched to fill a 16:9 display,
but on my 4:3 monitor. So I thought I could use the software scaler to
fix it while viewing.  But no, it segfaulted every time. Turns out it
was caused by having brightness=10 and contrast=10 in my config file. It
seems that setting any of these attributes on command line or in config
file causes the segfault.  Any file, any vo, sound/no sound, doesn't
seem to matter. Version is up to date CVS.

System Information

Linux distribution: Debian Woody
Kernel version: 2.4.21
libc version: 2.3.1
XFree86 Version 4.2.99.2 (DRI trunk) / X Window System

gcc version: 2.95.4 20011002 (Debian prerelease)

GNU ld version 2.14.90.0.4 20030523 Debian GNU/Linux

GNU assembler 2.14.90.0.4 20030523 Debian GNU/Linux

Hardware and drivers

# cat /proc/cpuinfo 
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 6
model name      : AMD Athlon(TM) XP 1900+
stepping        : 2
cpu MHz         : 1210.801
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips        : 2418.27

Video card: Club 3D Radeon 7500 64MB
Video driver: X built-in

Here's the output from gdb:

(gdb) run
Starting program: /mnt/work/divx/mplayer-cvs/main/mplayer -v -vf scale -brightness 1 /mnt/scratch/misc/terminator_3_trailer_m480.mpg
[New Thread 16384 (LWP 15954)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/stow/mplayer-cvs/share/locale

MPlayer dev-CVS-030722-21:20-2.95.4 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Athlon 4 PM Palomino/Athlon MP Multiprocessor/Athlon XP eXtreme Performance (Family: 6, Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

Reading config file /usr/local/stow/mplayer-cvs/etc/mplayer/mplayer.conf: No such file or directory
Reading config file /home/as/.mplayer/config
Reading /home/as/.mplayer/codecs.conf: 60 audio & 147 video codecs
CommandLine: '-v' '-vf' 'scale' '-brightness' '1' '/mnt/scratch/misc/terminator_3_trailer_m480.mpg'
get_path('font/font.desc') -> '/home/as/.mplayer/font/font.desc'
Font /home/as/.mplayer/font/font.desc loaded successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Using Linux hardware RTC timing (1024Hz).
get_path('input.conf') -> '/home/as/.mplayer/input.conf'
Parsing input config file /home/as/.mplayer/input.conf
Input config file /home/as/.mplayer/input.conf parsed: 6 binds
Setting up LIRC support...
get_path('terminator_3_trailer_m480.mpg.conf') -> '/home/as/.mplayer/terminator_3_trailer_m480.mpg.conf'

Playing /mnt/scratch/misc/terminator_3_trailer_m480.mpg
Not an URL!
[file] File size is 17510404 bytes
STREAM: [file] /mnt/scratch/misc/terminator_3_trailer_m480.mpg
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
Checking for YUV4MPEG2
DEMUXER: freeing demuxer at 0x84e2c18  
ASF_check: not ASF guid!
DEMUXER: freeing demuxer at 0x84e2c18  
Checking for NuppelVideo
DEMUXER: freeing demuxer at 0x84e2c18  
Checking for REAL
DEMUXER: freeing demuxer at 0x84e2c18  
Checking for SMJPEG
DEMUXER: freeing demuxer at 0x84e2c18  
DEMUXER: freeing demuxer at 0x84e3550  
Searching demuxer type for filename /mnt/scratch/misc/terminator_3_trailer_m480.mpg ext: .mpg
Checking for MOV
DEMUXER: freeing demuxer at 0x84e3550  
Checking for VIVO
header block 1 size: 0
DEMUXER: freeing demuxer at 0x84e3550  
DEMUXER: freeing demuxer at 0x84e3550  
DEMUXER: freeing demuxer at 0x84e3550  
DEMUXER: freeing demuxer at 0x84e3550  
DEMUXER: freeing demuxer at 0x84e3550  
DEMUXER: freeing demuxer at 0x84e3550  
DEMUXER: freeing demuxer at 0x84e3550  
Checking for PVA
DEMUXER: freeing demuxer at 0x84e3550  
Checking for TS...
TRIED UP TO POSITION 71523, FOUND 0, packet_size= 71
DEMUXER: freeing demuxer at 0x84e3550  
system stream synced at 0xB (0)!
==> Found video stream: 0
MPEG-PS file format detected.
==> Found audio stream: 0
Searching for sequence header... OK!
VIDEO:  MPEG1  480x256  (aspect 1)  24.00 fps  1150.0 kbps (143.8 kbyte/s)
[V] filefmt:2  fourcc:0x10000001  size:480x256  fps:24.00  ftime:=0.0417
get_path('sub/') -> '/home/as/.mplayer/sub/'
get_path('default.sub') -> '/home/as/.mplayer/default.sub'
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer
mp3lib: made decode tables with MMX optimization
mp3lib: using 3DNow!Ex optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer II, 44100 Hz 128 kbit Stereo, BPF: 418
Channels: 2, copyright: No, original: No, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 16000->176400 (128.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
X11 opening display: :0.0
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1600x1200 with depth 24 and 32 bpp (":0.0" => local display)
[x11] Detected wm supports layers.
[x11] Detected wm supports NetWM.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Detected wm supports STAYS_ON_TOP state.
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 480 x 256 (preferred csp: Mpeg PES)
Trying filter chain: scale vo
The selected video_out device is incompatible with this codec.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
set video colors brightness=1 

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 15954)]
sws_getColorspaceDetails (c=0x0, inv_table=0xbfffd60c, srcRange=0xbfffd610, 
    table=0xbfffd614, dstRange=0xbfffd618, brightness=0xbfffd61c, 
    contrast=0xbfffd620, saturation=0xbfffd624) at swscale.c:1665
1665            if(isYUV(c->dstFormat) || isGray(c->dstFormat)) return -1;

(gdb) bt
#0  sws_getColorspaceDetails (c=0x0, inv_table=0xbfffd60c, 
    srcRange=0xbfffd610, table=0xbfffd614, dstRange=0xbfffd618, 
    brightness=0xbfffd61c, contrast=0xbfffd620, saturation=0xbfffd624)
    at swscale.c:1665
#1  0x080e311d in control (vf=0x84face0, request=6, data=0xbfffd660)
    at vf_scale.c:299
#2  0x080d5c76 in set_video_colors (sh_video=0x84e5f48, 
    item=0x82d18dc "brightness", value=1) at dec_video.c:87
#3  0x08072f42 in main (argc=7, argv=0xbffff9a4) at mplayer.c:1696
(gdb)      disass $pc-32 $pc+32
Dump of assembler code from 0x81960ea to 0x819612a:
0x81960ea <sws_setColorspaceDetails+1262>:      or     $0x50,%al
0x81960ec <sws_setColorspaceDetails+1264>:      mov    0x8(%ebp),%edx
0x81960ef <sws_setColorspaceDetails+1267>:      push   %edx
0x81960f0 <sws_setColorspaceDetails+1268>:      
    call   0x81a0b24 <yuv2rgb_c_init_tables>
0x81960f5 <sws_setColorspaceDetails+1273>:      xor    %eax,%eax
0x81960f7 <sws_setColorspaceDetails+1275>:      lea    0xffffff78(%ebp),%esp
0x81960fd <sws_setColorspaceDetails+1281>:      pop    %ebx
0x81960fe <sws_setColorspaceDetails+1282>:      pop    %esi
0x81960ff <sws_setColorspaceDetails+1283>:      pop    %edi
0x8196100 <sws_setColorspaceDetails+1284>:      mov    %ebp,%esp
0x8196102 <sws_setColorspaceDetails+1286>:      pop    %ebp
0x8196103 <sws_setColorspaceDetails+1287>:      ret    
0x8196104 <sws_getColorspaceDetails>:   push   %ebp
0x8196105 <sws_getColorspaceDetails+1>: mov    %esp,%ebp
0x8196107 <sws_getColorspaceDetails+3>: mov    0x8(%ebp),%ecx
0x819610a <sws_getColorspaceDetails+6>: mov    0x30(%ecx),%eax
0x819610d <sws_getColorspaceDetails+9>: cmp    $0x59565955,%eax
0x8196112 <sws_getColorspaceDetails+14>:        
    je     0x8196145 <sws_getColorspaceDetails+65>
0x8196114 <sws_getColorspaceDetails+16>:        cmp    $0x32595559,%eax
0x8196119 <sws_getColorspaceDetails+21>:        
---Type <return> to continue, or q <return> to quit---
    je     0x8196145 <sws_getColorspaceDetails+65>
0x819611b <sws_getColorspaceDetails+23>:        cmp    $0x32315659,%eax
0x8196120 <sws_getColorspaceDetails+28>:        
    je     0x8196145 <sws_getColorspaceDetails+65>
0x8196122 <sws_getColorspaceDetails+30>:        cmp    $0x39555659,%eax
0x8196127 <sws_getColorspaceDetails+35>:        
    je     0x8196145 <sws_getColorspaceDetails+65>
0x8196129 <sws_getColorspaceDetails+37>:        cmp    $0x50343434,%eax
End of assembler dump.
(gdb)      info all-registers
eax            0x0      0
ecx            0x0      0
edx            0x84face0        139439328
ebx            0xbfffd660       -1073752480
esp            0xbfffd5c8       0xbfffd5c8
ebp            0xbfffd5c8       0xbfffd5c8
esi            0xbfffd660       -1073752480
edi            0x1      1
eip            0x819610a        0x819610a
eflags         0x210246 2163270
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x0      0
gs             0x0      0
st0            -nan(0x2ffed0002ffed)    (raw 0xffff0002ffed0002ffed)
st1            -nan(0xfffe0013fffe0013) (raw 0xfffffffe0013fffe0013)
st2            -nan(0x13ffffe8f9)       (raw 0xffff00000013ffffe8f9)
st3            -nan(0x15bfffffff9)      (raw 0xffff0000015bfffffff9)
st4            -nan(0x3ffef0003ffef)    (raw 0xffff0003ffef0003ffef)
st5            -nan(0xfffd0011fffd0011) (raw 0xfffffffd0011fffd0011)
st6            -nan(0xffffff90ffffe907) (raw 0xffffffffff90ffffe907)
---Type <return> to continue, or q <return> to quit---
st7            128.0000000000000026645352591003757      (raw 0x400680000000000000c0)
fctrl          0x37f    895
fstat          0x20     32
ftag           0xffff   65535
fiseg          0x0      0
fioff          0x0      0
foseg          0x0      0
fooff          0x0      0
fop            0x0      0
xmm0           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff), 
    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm1           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff), 
    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm2           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff), 
    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm3           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff), 
    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm4           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff), 
    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm5           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff), 
    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm6           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff), 
---Type <return> to continue, or q <return> to quit---
    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
xmm7           {f = {0x0, 0x0, 0x0, 0x0}}       {f = {-nan(0x7fffff), 
    -nan(0x7fffff), -nan(0x7fffff), -nan(0x7fffff)}}
mxcsr          0x1f80   8064
orig_eax       0xffffffff       -1
(gdb)



More information about the MPlayer-users mailing list