Commit dc49105c authored by Michael Niedermayer's avatar Michael Niedermayer

sink_buffer: prevent prematurely freeing of cur_buf

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 18908539
...@@ -115,6 +115,7 @@ static void end_frame(AVFilterLink *inlink) ...@@ -115,6 +115,7 @@ static void end_frame(AVFilterLink *inlink)
/* cache frame */ /* cache frame */
av_fifo_generic_write(buf->fifo, av_fifo_generic_write(buf->fifo,
&inlink->cur_buf, sizeof(AVFilterBufferRef *), NULL); &inlink->cur_buf, sizeof(AVFilterBufferRef *), NULL);
inlink->cur_buf = NULL;
if (buf->warning_limit && if (buf->warning_limit &&
av_fifo_size(buf->fifo) / sizeof(AVFilterBufferRef *) >= buf->warning_limit) { av_fifo_size(buf->fifo) / sizeof(AVFilterBufferRef *) >= buf->warning_limit) {
av_log(ctx, AV_LOG_WARNING, av_log(ctx, AV_LOG_WARNING,
......
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