[Libav-user] decoding to external buffers, AV_CODEC_CAP_DR1
knu at free.fr
Thu Nov 4 12:59:40 EET 2021
I'm working on a decoder specifically geared towards QTRLE and PCM (in
In order to avoid time consumming copies, I'd like to provide my own
output buffers to the codecs.
I can see in the sources that both codecs support external buffers :
FFmpeg/libavcodec/qtrle.c > line 594 > ".capabilities=AV_CODEC_CAP_DR1"
FFmpeg/libavcodec/pcm.c > line 559 > ".capabilities=AV_CODEC_CAP_DR1"
Unfortunately, the "flags" parameter of my get_buffer2 callback do not
have the AV_CODEC_CAP_DR1 flag set.
So, according to
"If AV_CODEC_CAP_DR1 is not set then get_buffer2() must call
avcodec_default_get_buffer2() instead of providing buffers allocated by
some other means." ;-(
I tried to set the "flags" property of my AVCodecContexts to
AV_CODEC_CAP_DR1 (codec_ctx->flags = AV_CODEC_CAP_DR1) but it does not help.
What am I doing wrong ? Is there something that I don't understand ?
Thanks for your help !
More information about the Libav-user