[Ffmpeg-devel] de/serializing AVFrames

Tilman Kranz tilman.kranz
Mon Jan 16 23:48:18 CET 2006


Hello everyone,

For the purpose of reordering a sequence of pFrames I use a linked
list of AVFrames as cache where I keep all (fully decoded) pFrames
between two keyframes. I would like this cache to reside on disk if
neccessary (it gets huge).

I saw what "avpicture_fill()" does. It assigns sizes and pointers, no
plane data is modified. So I assume that I can (de)serialize what is
referred to there as "ptr".

Explicitly, as long as I persist information on "pixel format",
"width" and "height" (from the codec context) I can reestablish the
picture information of an AVFrame from a stored buffer by allocating
a new one, restoring the buffer and running "avpicture_fill()" again
with appropriate parameters.

Am I correct? Also, if there is a higher-level way to do it or it is
likely to break in the future please let me know.

Friendly greetings,
Tilman Kranz





More information about the ffmpeg-devel mailing list