summaryrefslogtreecommitdiff
path: root/libavfilter/buffersink.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2013-03-20 11:40:28 +0100
committerNicolas George <nicolas.george@normalesup.org>2013-03-20 13:35:24 +0100
commit5eb273b2e767c86f78cc0e7e1a31bda4fedd2f56 (patch)
tree0c26c90f86cd2391cfc8ef950a94cbe1a5cd9ec0 /libavfilter/buffersink.c
parentac44e52f508fbab9811eb2ed09b31802b1d56366 (diff)
lavfi/buffersink: check av_frame_ref() failure.
Diffstat (limited to 'libavfilter/buffersink.c')
-rw-r--r--libavfilter/buffersink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 9bbc8d93b2..bcb6525102 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -137,7 +137,8 @@ int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFr
if (flags & AV_BUFFERSINK_FLAG_PEEK) {
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 {
av_fifo_generic_read(buf->fifo, &cur_frame, sizeof(cur_frame), NULL);
av_frame_move_ref(frame, cur_frame);