Commit 62f56fd7 authored by Michael Niedermayer's avatar Michael Niedermayer

buffersink/uninit: use av_frame_free() not unref

Fixes memleak
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 70db0c91
...@@ -63,7 +63,7 @@ static av_cold void uninit(AVFilterContext *ctx) ...@@ -63,7 +63,7 @@ static av_cold void uninit(AVFilterContext *ctx)
if (sink->fifo) { if (sink->fifo) {
while (av_fifo_size(sink->fifo) >= sizeof(AVFilterBufferRef *)) { while (av_fifo_size(sink->fifo) >= sizeof(AVFilterBufferRef *)) {
av_fifo_generic_read(sink->fifo, &frame, sizeof(frame), NULL); av_fifo_generic_read(sink->fifo, &frame, sizeof(frame), NULL);
av_frame_unref(frame); av_frame_free(&frame);
} }
av_fifo_free(sink->fifo); av_fifo_free(sink->fifo);
sink->fifo = NULL; sink->fifo = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment