[Ffmpeg-devel] [PATCH] proper fix for AC3 parser linkage
Justin Ruggles
justinruggles
Sun Apr 22 02:32:41 CEST 2007
Aurelien Jacobs wrote:
> On Sat, 21 Apr 2007 21:01:08 +0200
> matthieu castet <castet.matthieu at free.fr> 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 .
>
>
> I agree with this.
> The attached patch will move all the tables in ac3tab.c so that only
> ac3tab.o is required by parser.o.
> Note that to apply this patch you must:
> svn mv libavcodec/ac3tab.h libavcodec/ac3tab.c
> patch -p0 < ac3tab.diff
> svn add libavcodec/ac3tab.h
>
> If this patch is ok, I intend to apply it in several steps.
>
> Aurel
OK with me. Right now some of those tables are only used in ac3.c, so
they are currently declared static. I guess making them all global with
ff_* prefix doesn't really do any harm though.
Another way to apply these changes might be to do:
svn mv libavcodec/ac3tab.h libavcodec/ac3tab.c
svn cp libavcodec/ac3.h libavcodec/ac3tab.h
patch -p0 < ac3tab.diff
That way several of those declarations could be left alone. It would
also better reflect the ff_* renaming to have the change in the ac3tab.h
history rather than removing from one file and adding to another. Then
a separate cosmetic patch could be applied to do the vertical alignment.
-Justin
More information about the ffmpeg-devel
mailing list