[FFmpeg-user] AVFrame extend life beyond next call to avcodec_decode_video2

Robert Nagy ronag89 at gmail.com
Thu Aug 4 10:44:42 CEST 2011


Hi

I would like to extend the life of AVFrame provided by decode_video beyond
the next call to decode_video.

I have tried overriding release_buffer and defer the release_buffer call to
after I no longer need the buffer, however this crashes the application.

e.g.

static void null_release_buffer(AVCodecContext *codec, AVFrame *pic){}

...

old_release_buffer = codec->release_buffer;
codec->release_buffer = null_release_buffer;

... several decode_video calls

for all frames:
    old_release_buffer(&frame);

As a mentioned this strategy doesn't seems to work as the application
crashes.

Any suggestions?


More information about the ffmpeg-user mailing list