[Ffmpeg-devel] How to get pointer to MpegEncContext structurefrom AVCodec / AVCodecContext

Rich Felker dalias
Thu May 18 06:58:36 CEST 2006

On Wed, May 17, 2006 at 08:34:12PM +0100, Gary Pearman wrote:
> Let's say that I can allocate my own buffers for the decoded frames,
> what about the frames used in the MpegEncContext structure (i.e.
> next_picture, prev_picture)? I really don't want to have to do lots of
> memcpy()s or rewrite the codec to use my own buffer allocation scheme
> :-)

If you implement get_buffer and set the context to call it, everything
will work exactly the correct way. If there are some codecs which
won't use the user-provided buffers in this way, please send a patch
to fix them. :)


More information about the ffmpeg-devel mailing list