[FFmpeg-cvslog] r19787 - in trunk/libavcodec: aac.c aacenc.c ac3enc.c adpcm.c adxenc.c flacenc.c g726.c libfaac.c libgsm.c libmp3lame.c libopencore-amr.c libvorbis.c mpegaudioenc.c pcm-mpeg.c pcm.c roqaudioenc.c v...

Reimar Döffinger Reimar.Doeffinger
Sun Sep 6 18:08:07 CEST 2009

On Sun, Sep 06, 2009 at 04:58:13PM +0100, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> > Apart from that, I am very unhappy about the way decoders, encoders,
> > muxers etc. get registered currently, only due to the "next" pointer all
> > of that has to stay in the .data section and making up about 100 kB and
> > constantly growing...
> Do you have a suggestion for a portable alternative?

Well, not without breaking the API.
But you can just use
struct codec_list {
    struct codec_list *next;
    const AVCodec *codec;
} first_codec;

in principle. Admittedly this doubles the memory usage of the list
itself and the operation AVCodec -> list position becomes expensive
(that is one reason why I think it should/must involve breaking the
API), but at least all the other stuff AVCodec stuff can stay in .rodata
Or do you see an issue that I missed?

More information about the ffmpeg-cvslog mailing list