[Ffmpeg-devel] How to get pointer to MpegEncContext structurefrom AVCodec / AVCodecContext
Wed May 17 19:47:34 CEST 2006
> > I want ffmpeg to decode MPEG4 data into my own pre-allocated buffers.
> > Also, I need access to the last and next pictures contained within the
> > MpegEncContext structure, or I need them to be placed in buffers
> > allocated by me, not by the codec.
> > Basically I want to avoid using memcpy() to move the decoded frames
> > (including the next/prev frames) from one set of buffers to another.
> > Cheers,
> > Gaz.
> You can probably do that filling avcodec->get_buffer &
I'm not really clear on this and it seems that not all the codecs support it
(for instance the MJPEG codec ignores it) but there is the type variable in
the AVFrame structure that you can set to FF_BUFFER_TYPE_USER which I
believe means that you are responsible for allocating and deallocating the
There is a comment in there about internal and user allocated (direct
rendering) not being able to coexist but I don't know what that means
ffmpeg-devel mailing list
ffmpeg-devel at mplayerhq.hu
More information about the ffmpeg-devel