[MPlayer-dev-eng] Mencoder SegFault / Valgrind is Ok

Nick Fedchik nick at fedchik.org.ua
Wed Nov 29 12:07:59 CET 2006


On Wednesday 29 November 2006 00:31, RC wrote:
> First, this is NOT the list for bugreports.
> Second, that's a very old version of MPlayer, and an unofficial
> (potentially buggy) package anyhow.
I'm sorry that disturm again... but need some help how to find the segfault 
point and the problem source.
Ubuntu Linux 6.10 with 2 CPU
Dual Core AMD Opteron(tm) Processor 285 (Family: 15, Model: 33, Stepping: 2)
I update Subversion code, configure it:
./configure --prefix=/usr/local --enable-runtime-cpudetection --target=i686 \
 --disable-libcdio --enable-crash-debug 
(unfortunately it still didn't compile with --enable-debug)
than install and run 
/usr/local/bin/mencoder ./dvb.Bloomberg_European_TV.20061123193659.000005.ts\
-o ./output.flv -of lavf -lavfopts \ 
i_certify_that_my_video_stream_does_not_use_b_frames:format=flv \
 -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts \
vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050  
....
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
MP3 audio selected.
Segmentation fault

Next I run the same from valgrind - and result is ok (even if it so slow)
fnm at voodle-ci:/usr/local/src$ valgrind /usr/local/bin/mencoder\ 
./dvb.Bloomberg_European_TV.20061123193659.000005.ts -o ./output.flv\
-of lavf -lavfopts\ 
i_certify_that_my_video_stream_does_not_use_b_frames:format=flv\
-oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts \ 
vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050

==1852== Memcheck, a memory error detector.
==1852== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==1852== Using LibVEX rev 1471, a library for dynamic binary translation.
==1852== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==1852== Using valgrind-3.1.0-Debian, a dynamic binary instrumentation 
framework.
==1852== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==1852== For more details, rerun with: -v
==1852==
MEncoder dev-SVN-r21371-4.0.3 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium 4/Celeron 4 Northwood; Pentium 4 EE/Xeon Prestonia,Gallatin 
(Family: 15, Model: 2, Stepping: 7)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0  data: 0x0 - 0x1fe000
TS file format detected.
==1852== Source and destination overlap in memcpy(0xBEE0A258, 0xBEE0A258, 176)
==1852==    at 0x401E35B: memcpy (mac_replace_strmem.c:394)
==1852==    by 0x817ADDF: (within /usr/local/bin/mencoder)
VIDEO MPEG2(pid=1360) AUDIO MPA(pid=1320) NO SUBS (yet)!  PROGRAM N. 3
==1852==
==1852== Conditional jump or move depends on uninitialised value(s)
==1852==    at 0x8179B86: (within /usr/local/bin/mencoder)
==1852==
==1852== Conditional jump or move depends on uninitialised value(s)
==1852==    at 0x8179B92: (within /usr/local/bin/mencoder)
==1852==
==1852== Conditional jump or move depends on uninitialised value(s)
==1852==    at 0x8179B9E: (within /usr/local/bin/mencoder)
==1852==
==1852== Conditional jump or move depends on uninitialised value(s)
==1852==    at 0x8179BAA: (within /usr/local/bin/mencoder)
==1852==
==1852== Conditional jump or move depends on uninitialised value(s)
==1852==    at 0x8179B08: (within /usr/local/bin/mencoder)
==1852==
==1852== Conditional jump or move depends on uninitialised value(s)
==1852==    at 0x8179B13: (within /usr/local/bin/mencoder)
==1852==
==1852== Conditional jump or move depends on uninitialised value(s)
==1852==    at 0x8179B1E: (within /usr/local/bin/mencoder)
==1852==
==1852== Conditional jump or move depends on uninitialised value(s)
==1852==    at 0x8179B29: (within /usr/local/bin/mencoder)
==1852==
==1852== Conditional jump or move depends on uninitialised value(s)
==1852==    at 0x8179B34: (within /usr/local/bin/mencoder)
VIDEO:  MPEG2  704x576  (aspect 2)  25.000 fps  3500.0 kbps (437.5 kbyte/s)
[V] filefmt:29  fourcc:0x10000002  size:704x576  fps:25.00  ftime:=0.0400
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
** MUXER_LAVF 
*****************************************************************
You have certified that your video stream does not contain B frames.
REMEMBER: MEncoder's libavformat muxing is presently broken and will generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 704 x 576 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
MP3 audio selected.
VDec: vo config request - 704 x 576 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
videocodec: libavcodec (704x576 fourcc=31564c46 [FLV1])
[VE_LAVC] High quality encoding selected (non-realtime)!
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
VIDEO CODEC ID: 22f (13%)  0.57fps Trem:   0min   0mb  A-V:-0.004 [0:0]
AUDIO CODEC ID: 15001, TAG: 0
Writing header...

1 duplicate frame(s)!
Pos:   0.8s     22f (33%)  0.72fps Trem:   1min   0mb  A-V:-0.084 [0:58]
...
Pos:   4.1s     96f (100%)  0.71fps Trem:   0min   0mb  A-V:-0.060 [722:59]
Flushing video frames.
Writing index...

Video stream:  722.072 kbit/s  (90258 B/s)  size: 371867 bytes  4.120 secs  96 
frames

Audio stream:   59.704 kbit/s  (7462 B/s)  size: 31777 bytes  4.258 secs
==1852==
==1852== ERROR SUMMARY: 63757 errors from 10 contexts (suppressed: 63 from 1)
==1852== malloc/free: in use at exit: 5,646,940 bytes in 3,306 blocks.
==1852== malloc/free: 7,478 allocs, 4,172 frees, 45,763,545 bytes allocated.
==1852== For counts of detected errors, rerun with: -v
==1852== searching for pointers to 3,306 not-freed blocks.
==1852== checked 4,332,176 bytes.
==1852==
==1852== LEAK SUMMARY:
==1852==    definitely lost: 11,328 bytes in 41 blocks.
==1852==      possibly lost: 86,458 bytes in 3 blocks.
==1852==    still reachable: 5,549,154 bytes in 3,262 blocks.
==1852==         suppressed: 0 bytes in 0 blocks.
==1852== Use --leak-check=full to see details of leaked memory.


Is it a Mencoder bug or the problem is out there?

-- 
Best regards, Nick Fedchik



More information about the MPlayer-dev-eng mailing list