aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/buffersrc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-07-15 11:16:53 +0200
committerAnton Khirnov <anton@khirnov.net>2012-07-22 09:14:05 +0200
commit8f3a3ce7307e39a030db3bf8d2e525b21e039ca2 (patch)
treedf785a28eb2e8dfd7f30c55120da4e20be81e0d4 /libavfilter/buffersrc.c
parent1dc42050185d63c1de5d16146fbaee92640af187 (diff)
downloadffmpeg-8f3a3ce7307e39a030db3bf8d2e525b21e039ca2.tar.gz
lavfi: check all ff_get_video_buffer() calls for errors.
Diffstat (limited to 'libavfilter/buffersrc.c')
-rw-r--r--libavfilter/buffersrc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index 16a38a655e..c0cc3a3fff 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -92,6 +92,9 @@ int av_buffersrc_write_frame(AVFilterContext *buffer_filter, AVFrame *frame)
frame->format);
buf = ff_get_video_buffer(buffer_filter->outputs[0], AV_PERM_WRITE,
c->w, c->h);
+ if (!buf)
+ return AVERROR(ENOMEM);
+
av_image_copy(buf->data, buf->linesize, frame->data, frame->linesize,
c->pix_fmt, c->w, c->h);
break;