[Ffmpeg-devel] [PATCH] CONFIG_MUXERS

Diego Biurrun diego
Wed Sep 21 11:04:23 CEST 2005


On Wed, Sep 21, 2005 at 03:00:22AM +0200, Diego Biurrun wrote:
> On Tue, Sep 20, 2005 at 11:29:16AM +0200, Michael Niedermayer wrote:
> > 
> > On Tue, Sep 20, 2005 at 10:03:25AM +0200, Diego Biurrun wrote:
> > > 
> > > as recently discussed, this patch changes all occurrences of
> > > CONFIG_ENCODERS in libavformat to CONFIG_MUXERS and adds support for
> > > this to configure.  Individually disabling muxers would be nicer, but
> > > this is a start (and I could hack it up quickly before going to bed ;).
> > > 
> > > OK to apply?
> > 
> > if it works (only muxers, only demuxers, both)
> 
> Well, it works no worse than before, but the build system is broken...
> 
> I'll fix tomorrow.

OK, here is a patch that fixes --disable-encoders and --disable-decoders
in configure.  It compiles fine after my commit for the misplaced #ifdef
yesterday, but it fails to link with errors like

gcc -Wl,--warn-common -rdynamic -g  -o ffmpeg_g ffmpeg.o cmdutils.o
-L./libavformat -lavformat -L./libavcodec -lavcodec -L./libavutil
-lavutil -lm -lz -ldl
./libavformat/libavformat.a(utils.o): In function `put_fifo':
/home/diego/src/mplayer/ffmpeg/libavformat/utils.c:386: undefined
reference to `put_buffer'

repeated multiple times.  This is not a regression however, since it
obviously never worked before and will have to be fixed separately.

OK to apply the patch anyway or does this have to be fixed before?

Diego
-------------- next part --------------
--- configure	21 Aug 2005 20:33:00 -0000	1.200
+++ configure	21 Sep 2005 08:54:22 -0000
@@ -218,6 +218,8 @@
 pthreads="no"
 gpl="no"
 memalignhack="no"
+encoders="yes"
+decoders="yes"
 
 # OS specific
 targetos=`uname -s`
@@ -530,8 +532,10 @@
   --disable-codec=*) CODEC_LIST="`echo $CODEC_LIST | sed -e \"s#${opt#--disable-codec=}##\"`"
   ;;
   --disable-encoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*encoder//g'`"
+  encoders="no"
   ;;
   --disable-decoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*decoder//g'`"
+  decoders="no"
   ;;
   esac
 done
@@ -1391,13 +1395,18 @@
 version=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" |
  cut -d '"' -f 2`
 echo "VERSION=$version" >>config.mak
-# if you do not want to use encoders, disable that.
-echo "#define CONFIG_ENCODERS 1" >> $TMPH
-echo "CONFIG_ENCODERS=yes" >> config.mak
-
-# if you do not want to use decoders, disable that.
-echo "#define CONFIG_DECODERS 1" >> $TMPH
-echo "CONFIG_DECODERS=yes" >> config.mak
+
+# encoders
+if test "$encoders" = "yes" ; then
+  echo "#define CONFIG_ENCODERS 1" >> $TMPH
+  echo "CONFIG_ENCODERS=yes" >> config.mak
+fi
+
+# decoders
+if test "$decoders" = "yes" ; then
+  echo "#define CONFIG_DECODERS 1" >> $TMPH
+  echo "CONFIG_DECODERS=yes" >> config.mak
+fi
 
 # AC3
 if test "$a52" = "yes" ; then



More information about the ffmpeg-devel mailing list