[Ffmpeg-devel] [bug] raw.c link failure on ff_ac3_parse_header

Måns Rullgård mans
Mon Apr 9 22:42:07 CEST 2007


Diego Biurrun <diego at biurrun.de> writes:

> On Thu, Mar 22, 2007 at 10:35:40AM +0200, Uoti Urpala wrote:
>> On Thu, 2007-03-22 at 09:21 +0100, Diego Biurrun wrote:
>> > On Wed, Mar 21, 2007 at 11:31:34PM -0500, Justin Ruggles wrote:
>> > > It seems to me that putting ac3.o in the OBJS list in the libavcodec
>> > > Makefile would solve this.  Would this be an ok thing to do?
>> > 
>> > No.  The report remains incomplete and the problem unreproducible.
>> 
>> The problem seems clear: libavformat/raw.c unconditionally compiles a
>> call to ff_ac3_parse_header, but that function itself is not compiled
>> unconditionally.
>
> Attached is a patch that fixes the issue and makes ff_ac3_parse_header
> conditional to CONFIG_AC3_PARSER, which I believe is the correct
> solution.  Is it necessary to #ifdef ff_ac3_parse header in ac3.h as
> well?

If it compiles correctly in both cases, no.

> Index: libavformat/allformats.c
> ===================================================================
> --- libavformat/allformats.c	(revision 8688)
> +++ libavformat/allformats.c	(working copy)
> @@ -45,7 +45,8 @@
>      avcodec_register_all();
>  
>      REGISTER_DEMUXER (AAC, aac);
> -    REGISTER_MUXDEMUX(AC3, ac3);
> +    if (ENABLE_AC3_PARSER) REGISTER_DEMUXER (AC3, ac3);
> +    REGISTER_MUXER   (AC3, ac3);

You could make AC3_DEMUXER depend on AC3_PARSER in configure instead.
That might be cleaner.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list