summaryrefslogtreecommitdiff
path: root/libavfilter/vf_yadif.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/vf_yadif.c
parent1dc42050185d63c1de5d16146fbaee92640af187 (diff)
lavfi: check all ff_get_video_buffer() calls for errors.
Diffstat (limited to 'libavfilter/vf_yadif.c')
-rw-r--r--libavfilter/vf_yadif.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index db4956c2cc..c6d78a5ae9 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -173,6 +173,9 @@ static int return_frame(AVFilterContext *ctx, int is_second)
if (is_second) {
yadif->out = ff_get_video_buffer(link, AV_PERM_WRITE | AV_PERM_PRESERVE |
AV_PERM_REUSE, link->w, link->h);
+ if (!yadif->out)
+ return AVERROR(ENOMEM);
+
avfilter_copy_buffer_ref_props(yadif->out, yadif->cur);
yadif->out->video->interlaced = 0;
}
@@ -239,6 +242,8 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
yadif->out = ff_get_video_buffer(ctx->outputs[0], AV_PERM_WRITE | AV_PERM_PRESERVE |
AV_PERM_REUSE, link->w, link->h);
+ if (!yadif->out)
+ return AVERROR(ENOMEM);
avfilter_copy_buffer_ref_props(yadif->out, yadif->cur);
yadif->out->video->interlaced = 0;