[FFmpeg-cvslog] avfilter/vf_tinterlace: check clone return value

Michael Niedermayer git at videolan.org
Tue Nov 19 18:19:01 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Nov 19 18:08:58 2013 +0100| [6a71efff33e74d2c0ca73684ffb5dc3f58841f51] | committer: Michael Niedermayer

avfilter/vf_tinterlace: check clone return value

Inspired by: 3a16ec19d2426457419cb8a7304f97982699efda

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c
index 9c1b848..db82393 100644
--- a/libavfilter/vf_tinterlace.c
+++ b/libavfilter/vf_tinterlace.c
@@ -263,6 +263,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
     case MODE_DROP_ODD:  /* only output even frames, odd  frames are dropped; height unchanged, half framerate */
     case MODE_DROP_EVEN: /* only output odd  frames, even frames are dropped; height unchanged, half framerate */
         out = av_frame_clone(tinterlace->mode == MODE_DROP_EVEN ? cur : next);
+        if (!out)
+            return AVERROR(ENOMEM);
         av_frame_free(&tinterlace->next);
         break;
 



More information about the ffmpeg-cvslog mailing list