ports/113922: multimedia/ffmpeg segfaults on start

Gary Palmer gpalmer at freebsd.org
Fri Jul 13 03:00:18 UTC 2007

The following reply was made to PR ports/113922; it has been noted by GNATS.

From: Gary Palmer <gpalmer at freebsd.org>
To: bug-followup at FreeBSD.org
Subject: Re: ports/113922: multimedia/ffmpeg segfaults on start
Date: Fri, 13 Jul 2007 03:40:02 +0100

 I also experienced the crash.  I tracked it down to ffmpeg source code.
 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 0x8480000 (LWP 100306)]
 0x48852af7 in __vfprintf () from /lib/libc.so.6
 (gdb) bt
 #0  0x48852af7 in __vfprintf () from /lib/libc.so.6
 #1  0x488536f1 in vfprintf () from /lib/libc.so.6
 #2  0x0805fd7d in log_callback_help (ptr=0x0, level=1, fmt=0x837b39c 
     vl=0x82c4b7e "\203Ä\030[Ã\220S\203ì\b\215D$\034Pÿt$\034ÿt$\034è")
     at ffmpeg.c:3735
 #3  0x082c4b7e in av_vlog (avcl=0x848e010, level=137788800,
     fmt=0x837b39c "T²7\b", vl=0x82c4baa "\203Ä\030[Ã\220è") at log.c:65
 #4  0x082c4baa in av_log (avcl=0x848e010, level=0, fmt=0x837b39c "T²7\b")
     at log.c:58
 #5  0x081a9c13 in av_opt_show (obj=0x8477130, av_log_obj=0x0) at opt.c:335
 #6  0x0805fe93 in show_help () at ffmpeg.c:3771
 #7  0x08060d03 in main (argc=1, argv=0xbfbfe808) at ffmpeg.c:3798
 Notice the fmt parameters are garbage from 4 upwards
 #6  0x0805fe93 in show_help () at ffmpeg.c:3771
 3771        av_opt_show(sws_opts, NULL);
 Looking through the code, sws_opts is populated at ffmpeg.c in main() at 
 line 3794 with a call to sws_getContext
 The real fun is that the ffmpeg code has TWO definitions for 
 sws_getContext when you have --enable-swscaler passed to configure 
 (which is the default for the port).  One is defined in 
 libavcodec/imgresample.c and the other in libswscale/swscale.c
 At least on my system, the linker defaulted to the version in libavcodec 
 which leads to the SIGSEGV.  Putting "#if 0" around the definitions for 
 sws_getContext, sws_freeContext and sws_scale in 
 libavcodec/imgresample.c appears to stop the SIGSEGV for me.
 Alternatively, deleting the files/patch-libavcodec_Makefile patch file 
 appears to also stop the coredump.
 I do not have enough experience with this port to know if either option 
 has bad side effects

More information about the freebsd-multimedia mailing list