[FFmpeg-cvslog] vf_tinterlace: check av_image_get_linesize() return value

Michael Niedermayer git at videolan.org
Sat Nov 3 02:46:02 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov  3 02:21:49 2012 +0100| [ac2a3a7a05197844f01ddeea972cfbbc511e1efb] | committer: Michael Niedermayer

vf_tinterlace: check av_image_get_linesize() return value

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

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

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

diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c
index 70e1eab..6cc8ad6 100644
--- a/libavfilter/vf_tinterlace.c
+++ b/libavfilter/vf_tinterlace.c
@@ -188,6 +188,10 @@ void copy_picture_field(uint8_t *dst[4], int dst_linesize[4],
         int linesize = av_image_get_linesize(format, w, plane);
         uint8_t *dstp = dst[plane];
         const uint8_t *srcp = src[plane];
+
+        if (linesize < 0)
+            return;
+
         lines /= k;
         if (src_field == FIELD_LOWER)
             srcp += src_linesize[plane];



More information about the ffmpeg-cvslog mailing list