diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-15 13:16:53 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-22 11:14:05 +0400 |
commit | 8f3a3ce7307e39a030db3bf8d2e525b21e039ca2 (patch) | |
tree | df785a28eb2e8dfd7f30c55120da4e20be81e0d4 /libavfilter/vf_yadif.c | |
parent | 1dc42050185d63c1de5d16146fbaee92640af187 (diff) |
lavfi: check all ff_get_video_buffer() calls for errors.
Diffstat (limited to 'libavfilter/vf_yadif.c')
-rw-r--r-- | libavfilter/vf_yadif.c | 5 |
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; |