Skip to content
Snippets Groups Projects
Commit 5eb273b2 authored by Nicolas George's avatar Nicolas George
Browse files

lavfi/buffersink: check av_frame_ref() failure.

parent ac44e52f
Branches
Tags
No related merge requests found
...@@ -137,7 +137,8 @@ int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFr ...@@ -137,7 +137,8 @@ int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFr
if (flags & AV_BUFFERSINK_FLAG_PEEK) { if (flags & AV_BUFFERSINK_FLAG_PEEK) {
cur_frame = *((AVFrame **)av_fifo_peek2(buf->fifo, 0)); cur_frame = *((AVFrame **)av_fifo_peek2(buf->fifo, 0));
av_frame_ref(frame, cur_frame); /* TODO check failure */ if ((ret = av_frame_ref(frame, cur_frame)) < 0)
return ret;
} else { } else {
av_fifo_generic_read(buf->fifo, &cur_frame, sizeof(cur_frame), NULL); av_fifo_generic_read(buf->fifo, &cur_frame, sizeof(cur_frame), NULL);
av_frame_move_ref(frame, cur_frame); av_frame_move_ref(frame, cur_frame);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment