[MPlayer-dev-eng] [PATCH] support for shared libavformat

Diego Biurrun diego at biurrun.de
Mon Jan 9 00:11:01 CET 2006


On Sun, Jan 08, 2006 at 11:39:35PM +0100, Nico Sabbi wrote:
> Diego Biurrun wrote:
> 
> >In any case it should be consistent.  Maybe you can commit my suggestion
> >first and then we can discuss changing lavc/lavf together.  How about
> >that?
> 
> new, more consistent, patch attached. Please, review
> 
> @@ -1805,7 +1806,7 @@
>    --enable-codec=*)	_libavcodecs="$_libavcodecs `echo $ac_option | cut -d '=' -f 2`" ;;
>    --disable-codec=*)	_libavcodecs=`echo $_libavcodecs | sed "s/\`echo $ac_option | cut -d '=' -f 2\`//g"` ;;
>    --enable-libavformat)	_libavformat=yes;;
> -  --disable-libavformat)	_libavformat=no	;;
> +  --disable-libavformat)	_libavformat=no; _libavformat_so=no	;;

Hmm, --disable-libavcodec does not disable _libavcodec_so, this should
behave the same way.

> +echocheck "FFmpeg libavformat (dynamic)"
> +if test "$_libavformat_so" = auto ; then
> +  _libavformat_so=no
> +  cat > $TMPC <<EOF
> +  #include <ffmpeg/avformat.h>
> +  int main(void) { av_alloc_format_context(); return 0; }
> +EOF
> +  cc_check $_ld_lm -lavformat && _libavformat_so=yes
> +fi
> +echores "$_libavformat_so"
> +
>  _def_libavcodec='#undef USE_LIBAVCODEC'
>  _def_libavcodecso='#undef USE_LIBAVCODEC_SO'
>  _def_ffpostprocess='#undef FF_POSTPROCESS'
> @@ -6083,14 +6095,24 @@
>  fi
>  
>  _def_libavformat='#undef USE_LIBAVFORMAT'
> +_def_libavformat_so='#undef USE_LIBAVFORMAT_SO'
>  _def_libavformat_win32='#undef CONFIG_WIN32'
>  if test "$_libavformat" = yes ; then
> +  _libavformat_so=no

Please also handle this like the libavcodec case, maybe we can simplify
this later.  I mean remove this line and addo

  if test "$_libavcformat" != yes ; then

before the dynamic lavf test.

> --- libmpdemux/Makefile	14 Dec 2005 21:52:41 -0000	1.98
> +++ libmpdemux/Makefile	8 Jan 2006 22:36:04 -0000
> @@ -117,7 +116,13 @@
>  endif
>  ifeq ($(CONFIG_LIBAVFORMAT),yes)
>  LIBAV_INC += -I../libavformat
> -SRCS += muxer_lavf.c
> +SRCS += demux_lavf.c \
> +	muxer_lavf.c
> +endif
> +ifeq ($(CONFIG_LIBAVFORMAT_SO),yes)
> +LIBAV_INC += -I../libavformat

This line can be removed as you already noted.

Diego




More information about the MPlayer-dev-eng mailing list