[FFmpeg-cvslog] vf_interlace: check one av_frame_clone allocation

Vittorio Giovara git at videolan.org
Tue Nov 19 18:19:00 CET 2013


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon Nov 11 01:04:17 2013 +0100| [3a16ec19d2426457419cb8a7304f97982699efda] | committer: Vittorio Giovara

vf_interlace: check one av_frame_clone allocation

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3a16ec19d2426457419cb8a7304f97982699efda
---

 libavfilter/vf_interlace.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c
index aea4fdb..a05ab03 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;



More information about the ffmpeg-cvslog mailing list