vf_tinterlace: check av_image_get_linesize() return value
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 3 Nov 2012 01:21:49 +0000 (02:21 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 3 Nov 2012 01:38:30 +0000 (02:38 +0100)
Fixes CID703717
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vf_tinterlace.c

index 70e1eab..6cc8ad6 100644 (file)
@@ -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];