[FFmpeg-devel] [PATCH] avfilter/avf_showcqt: fix frame management

Muhammad Faiz mfcc64 at gmail.com
Tue Oct 13 10:48:07 CEST 2015


On Tue, Oct 13, 2015 at 1:31 PM, Clément Bœsch <u at pkh.me> wrote:
>
> Did you test if you get the same results with and without the perms
> filter?
>

it gives mostly same result (e.g in common usage with ffplay)
it gives more correct result when  you still need frame reference like this
code

// buffersink is connected to showcqt filter
int i
AVFrame *frame[32];
for (i = 0; i < 32; i++) {
    frame[i] = av_frame_alloc();
    av_buffersink_get_frame_flags(buffersink, frame[i], 0);
}

the old code will gives incorrect result (frame[0] to frame[30] will be
clobbered by frame[31] because they reference to the same buffers

thanks


More information about the ffmpeg-devel mailing list