[Ffmpeg-devel] [PATCH] proper fix for AC3 parser linkage

Justin Ruggles justinruggles
Sat Apr 21 23:31:53 CEST 2007

matthieu castet wrote:
> Diego Biurrun wrote:
>>Attached is a proper fix for the link failure when disabling the AC3
>>encoder while the AC3 parser is still enabled.
>>It has the added benefit of removing some extern declarations from
>>ac3.h, the diffstat should be quite convincing.
>> 3 files changed, 2 insertions(+), 13 deletions(-)
>>I'll commit tomorrow if nobody objects.
> Hum, this seems broken : now we have ac3tab.h global array declaration 
> in ac3.c and parser.c.
> And also now these array are duplicated.
> That's why I always found ugly to put data declaration and init in 
> header file instead of *.c .

And soon ac3dec.c will need those tables as well.  I like it as-is.
Having the common ac3.o object compiled if the ac3 parser is enabled
seems like an okay thing to me...

Also, if those declarations are removed from ac3.h, they should be made
static in ac3tab.h and the ff_ prefixes removed.  But I don't like doing
that anyway.

The current setup is essentially like having the table data in ac3.c
since that's the only file which includes ac3tab.h.  It just provides a
little more functional separation than putting it directly in ac3.c.


More information about the ffmpeg-devel mailing list