Imported Debian version 2.5.2~trusty
[deb_ffmpeg.git] / ffmpeg / libavcodec / utvideodec.c
index b565c1076c6a82a18ad1268f8ef08e5c8684b0cd..3a3c46e0bc6695052dcd753e116efae3fd892dd8 100644 (file)
@@ -215,6 +215,8 @@ static void restore_median(uint8_t *src, int step, int stride,
         slice_height = ((((slice + 1) * height) / slices) & cmask) -
                        slice_start;
 
+        if (!slice_height)
+            continue;
         bsrc = src + slice_start * stride;
 
         // first line - left neighbour prediction
@@ -270,6 +272,8 @@ static void restore_median_il(uint8_t *src, int step, int stride,
         slice_height   = ((((slice + 1) * height) / slices) & cmask) -
                          slice_start;
         slice_height >>= 1;
+        if (!slice_height)
+            continue;
 
         bsrc = src + slice_start * stride;