Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23611 - mencoder segfault when used improperly
Summary: mencoder segfault when used improperly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-27 12:06 UTC by Voltron Rex
Modified: 2003-08-24 00:46 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Voltron Rex 2003-06-27 12:06:57 UTC
Greetings

I'm trying to convert an ASF file to an MP3. I was positive mencoder had the
ability to accomplish this, as mplayer can play the file. So to encode to MP3, I
tried this command:

mencoder -o lenny.mp3 -oac mp3lame -v lenny_kravitz_WeWantPeace.asf

Turns out this command is COMPLETELY WRONG. The correct way to do this is:

mplayer -ao pcm -aofile audio.wav lenny_kravitz_WeWantPeace.asf
oggenc -o lenny.ogg audio.wav

OK, fine, my bad. However, mencoder segfaults, which isn't pretty. Here's the
segfault output:

MEncoder 0.90rc5-3.3 (C) 2000-2003 Arpad Gereoffy (see DOCS)

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: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Reading /home/saan/.mplayer/codecs.conf: can't open
'/home/saan/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 50 audio & 136 video codecs
File not found: 'frameno.avi'
Reading config file /home/saan/.mplayer/mencoder: No such file or directory
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Not an URL!
File size is 3779423 bytes
success: format: 0  data: 0x0 - 0x39AB5F
Checking for YUV4MPEG2
DEMUXER: freeing demuxer at 0x841cbf0
ASF file format detected.

 Title: We Want Peace
 Author: Leny Kravitz
 Copyright: 2003 Virgin Records
 Comment: http://www.rockthevote.org

ASF: packets: 632  flags: 2  max_packet_size: 5976  min_packet_size: 5976 
max_bitrate: 128639  preroll: 1578
stream type: guid_audio_stream
stream concealment: guid_audio_conceal_interleave
type: 28 bytes,  stream: 8 bytes  ID: 1
unk1: 0  unk2: 6E5FFDC
FILEPOS=0x9A9
==> Found audio stream: 1
======= WAVE Format =======
Format Tag: 353 (0x161)
Channels: 2
Samplerate: 44100
avg byte/sec: 16002
Block align: 5945
bits/sample: 16
cbSize: 10
Unknown extra header dump: [0] [88] [0] [0] [f] [0] [e5] [5c] [0] [0]
ASF: audio scrambling: 1 x 1 x 5945
============ ASF Stream group == START ===
 object size = 32
 stream count=[0x1][1]
   stream id=[0x1][1]
   max bitrate=[0x1f67f][128639]
============ ASF Stream group == END ===
Found movie at 0xA1F - 0x39AB5F
ASF: 1 audio and 0 video streams found
ASF: Searching for audio stream (id:1).
Invalid plen type! assuming plen=0
Auto-selected ASF audio ID = 1
Invalid plen type! assuming plen=0
Segmentation fault



Here's emerge info:
Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4)
=================================================================
System uname: 2.4.20-gentoo-r5 i686 AMD Athlon(tm) XP 1800+
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo/
http://gentoo.oregonstate.edu/
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow apm avi crypt encode gif jpeg gnome libg++ mikmod mmx mpeg
ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb
gtkhtml alsa gdbm slang readline arts tetex aalib bonobo svga tcltk java guile
ruby mysql X sdl tcpd pam libwww ssl perl python esd imlib oggvorbis gtk qt kde
motif opengl gphoto2 cdr cups 3dfx acpi dga dvd emacs flash gtk2 kerberos
mozilla pda plotutils samba sse usb xml -gpm -berkdb"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -mmmx -msse -m3dnow -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=athlon-xp -mmmx -msse -m3dnow -O3 -pipe -fomit-frame-pointer"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2003-06-27 19:07:01 UTC
I wonder if this is a gentoo bug or if it should instead be reported to
the mencoder authors.
Comment 2 Voltron Rex 2003-06-28 02:03:46 UTC
Greetings,

In response to whether it should be reported to the mencoder authors--I really don
Comment 3 Voltron Rex 2003-06-28 02:03:46 UTC
Greetings,

In response to whether it should be reported to the mencoder authors--I really don´t know. I was under the impression that I should report the bug here, and if it´s a bug that should be reported to mencoder, the gentoo mplayer maintainer would handle it. I can´t remember where I got this impression, so perhaps I made it up...

Thanks
Ben
Comment 4 Seemant Kulleen (RETIRED) gentoo-dev 2003-08-23 16:53:27 UTC
Voltron, your impression is correct
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-24 00:46:15 UTC
Should be fixed with following change in ChangeLog:

------------------------------------------------------------------------
--- ChangeLog   2003-08-21 06:03:55.000000000 +0200
+++ ChangeLog.new       2003-08-24 09:42:38.707809816 +0200
@@ -2,6 +2,11 @@
 # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
 # $Header: /home/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.72 2003/08/21 04:03:55 azarah Exp $
  
+  24 Aug 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.90-r2.ebuild,
+  mplayer-0.90-r5.ebuild, mplayer-0.90_rc4.ebuild, mplayer-0.91.ebuild,
+  files/mencoder-segfault.patch:
+  Fix segfault mencoder segfault when used improperly, bug #23611
+
 *mplayer-0.91 (20 Aug 2003)
  
   20 Aug 2003; Martin Schlemmer <azarah@gentoo.org> mplayer-0.91.ebuild:
------------------------------------------------------------------------

==================== Before ============================
$ mencoder -o lenny.mp3 -oac mp3lame -v /space/MP3/Nine_Days/Radiohead-Karma_Police_\(live\).mp3
MEncoder 0.91-3.3.1  (C) 2000-2003 MPlayer Team
 
CPU: Intel  (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Reading /root/.mplayer/codecs.conf: can't open '/root/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 50 audio & 136 video codecs
File not found: 'frameno.avi'
Reading config file /root/.mplayer/mencoder: No such file or directory
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Not an URL!
File size is 2730696 bytes
success: format: 0  data: 0x0 - 0x29AAC8
Checking for YUV4MPEG2
DEMUXER: freeing demuxer at 0x84690f0
ASF_check: not ASF guid!
DEMUXER: freeing demuxer at 0x84690f0
Checking for NuppelVideo
DEMUXER: freeing demuxer at 0x84690f0
Checking for REAL
DEMUXER: freeing demuxer at 0x84690f0
Checking for SMJPEG
DEMUXER: freeing demuxer at 0x84690f0
Searching demuxer type for filename /space/MP3/Nine_Days/Radiohead-Karma_Police_(live).mp3 ext: .mp3
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
demux_audio: audio data 0x19D - 0x0
Audio file detected.
Segmentation fault

================== After =====================
$ ./mencoder -o lenny.mp3 -oac mp3lame -v /space/MP3/Nine_Days/Radiohead-Karma_Police_\(live\).mp3
MEncoder 0.91-3.3.1  (C) 2000-2003 MPlayer Team
 
CPU: Intel  (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Reading /root/.mplayer/codecs.conf: can't open '/root/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 50 audio & 136 video codecs
File not found: 'frameno.avi'
Reading config file /root/.mplayer/mencoder: No such file or directory
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Not an URL!
File size is 2730696 bytes
success: format: 0  data: 0x0 - 0x29AAC8
Checking for YUV4MPEG2
DEMUXER: freeing demuxer at 0x84690f0
ASF_check: not ASF guid!
DEMUXER: freeing demuxer at 0x84690f0
Checking for NuppelVideo
DEMUXER: freeing demuxer at 0x84690f0
Checking for REAL
DEMUXER: freeing demuxer at 0x84690f0
Checking for SMJPEG
DEMUXER: freeing demuxer at 0x84690f0
Searching demuxer type for filename /space/MP3/Nine_Days/Radiohead-Karma_Police_(live).mp3 ext: .mp3
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
demux_audio: audio data 0x19D - 0x0
Audio file detected.
Video: Cannot read properties.
Exiting...