summaryrefslogtreecommitdiff
path: root/libavfilter/vf_interlace.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2013-11-11 01:04:17 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2013-11-19 14:48:36 +0100
commit3a16ec19d2426457419cb8a7304f97982699efda (patch)
tree679eba9870d62e343f0eb965aed1cb450e1e1d44 /libavfilter/vf_interlace.c
parentc673fc919c374c60b1e6d80d8822712eadf67f16 (diff)
vf_interlace: check one av_frame_clone allocation
Diffstat (limited to 'libavfilter/vf_interlace.c')
-rw-r--r--libavfilter/vf_interlace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c
index aea4fdb822..a05ab03a6d 100644
--- a/libavfilter/vf_interlace.c
+++ b/libavfilter/vf_interlace.c
@@ -185,6 +185,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
av_log(ctx, AV_LOG_WARNING,
"video is already interlaced, adjusting framerate only\n");
out = av_frame_clone(s->cur);
+ if (!out)
+ return AVERROR(ENOMEM);
out->pts /= 2; // adjust pts to new framerate
ret = ff_filter_frame(outlink, out);
s->got_output = 1;