[Ffmpeg-devel] Patch for dynamic liba52.so loading

August Mayer amayer
Fri Jun 10 18:44:47 CEST 2005


Hello,

It seems that the code for dynamically loading liba52.so (CONFIG_AC3 && 
CONFIG_A52BIN) has been rotting for some time. There are two problems in 
libavcodec/a52dec.c:
1. It uses fprintf instead of av_log, and
2. libavcodec/parser.c directly links to a52_syncinfo, which is not 
available as a global symbol in this case.

I've corrected these two problems; attached are the patches for it.

Moreover, I have changed the code so that the references and function 
pointers are stored in static variables instead of the AVCodecContext. 
This looks more sensible to me, because liba52 only needs to be loaded 
once during program lifetime. Is it possible that there are multiple 
codec contexts? If so, then liba52.so would have been loaded multiple times.

Please tell me if there are problems with my solution; I shall correct them.

There is also a libavcodec/ac3dec.c file, which seems an older version 
of a52dec.c and unused. I think it should be removed.

thanks & greetings   August Mayer

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 01-a52dec.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050610/b11786a5/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 02-parser.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050610/b11786a5/attachment.asc>



More information about the ffmpeg-devel mailing list