[Ffmpeg-devel] core dump when displaying ffmpeg help

Xavier Rodriguez INEXBEE xavier.rodriguez
Tue Sep 20 12:34:17 CEST 2005


Hi,

When displaying the help options of ffmpeg I have a core dump on my 
Solaris 8 HW 12/02 s28s_hw1wos_06a SPARC / gcc (GCC) 3.3.2.:

./ffmpeg
...
AVCodecContext AVOptions:
-bit_rate          E.VA.Segmentation Fault (core dumped)

I resolved it by using this _VERY_UGLY_ patch:

bash-2.03$ diff -u libavcodec/utils.original libavcodec/utils.c
--- libavcodec/utils.original   2005-09-20 12:05:52.830011000 +0200
+++ libavcodec/utils.c  2005-09-20 12:29:55.540014000 +0200
@@ -33,6 +33,7 @@
 #include <limits.h>
 #include <float.h>

+
 const uint8_t ff_reverse[256]={
 
0x00,0x80,0x40,0xC0,0x20,0xA0,0x60,0xE0,0x10,0x90,0x50,0xD0,0x30,0xB0,0x70,0
xF0,
 
0x08,0x88,0x48,0xC8,0x28,0xA8,0x68,0xE8,0x18,0x98,0x58,0xD8,0x38,0xB8,0x78,0
xF8,
@@ -444,6 +445,7 @@
 #define S AV_OPT_FLAG_SUBTITLE_PARAM
 #define E AV_OPT_FLAG_ENCODING_PARAM
 #define D AV_OPT_FLAG_DECODING_PARAM
+#define NULL ""

 static AVOption options[]={
 {"bit_rate", NULL, OFFSET(bit_rate), FF_OPT_TYPE_INT, DEFAULT, INT_MIN,
INT_MAX, V|A|E},
@@ -708,7 +710,8 @@
 {"me_penalty_compensation", NULL, OFFSET(me_penalty_compensation),
FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
 {NULL},
 };
-
+#undef NULL
+#define NULL ((void*)0)
 #undef A
 #undef V

Best regards,
Xavier






More information about the ffmpeg-devel mailing list