aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-11 23:11:29 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-11 23:11:51 +0100
commita0316589e472d9372daf5f5afd1e17a69ded226d (patch)
treefbb6da40eaf65aa302f1f782220609aef9203008
parent9575bd6a9d4c9527f09e3d906b338d6c184bafce (diff)
parent335ec616cc38ee6206a3acebd46d01aad73d721b (diff)
downloadffmpeg-a0316589e472d9372daf5f5afd1e17a69ded226d.tar.gz
Merge commit '335ec616cc38ee6206a3acebd46d01aad73d721b' into release/0.10
* commit '335ec616cc38ee6206a3acebd46d01aad73d721b': utvideodec: Handle slice_height being zero Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/utvideo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utvideo.c b/libavcodec/utvideo.c
index 332c1ea375..293de6ed57 100644
--- a/libavcodec/utvideo.c
+++ b/libavcodec/utvideo.c
@@ -246,6 +246,8 @@ static void restore_median(uint8_t *src, int step, int stride,
for (slice = 0; slice < slices; slice++) {
slice_start = ((slice * height) / slices) & cmask;
slice_height = ((((slice + 1) * height) / slices) & cmask) - slice_start;
+ if (!slice_height)
+ continue;
bsrc = src + slice_start * stride;
@@ -301,6 +303,8 @@ static void restore_median_il(uint8_t *src, int step, int stride,
slice_start = ((slice * height) / slices) & cmask;
slice_height = ((((slice + 1) * height) / slices) & cmask) - slice_start;
slice_height >>= 1;
+ if (!slice_height)
+ continue;
bsrc = src + slice_start * stride;