aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov2013-02-19 08:15:07 +0100
committerAnton Khirnov2013-03-08 08:10:02 +0100
commitd243896987b8b2062d1faba4d8d6f0c62d2dbee9 (patch)
tree30a89708f4464ed427c9e09bd4a7f6d2d1e6efbf
parent7b89cd20d844cbe763ca34e63e99d110043cf241 (diff)
ffv1: fix calculating slice dimensions for version 2
It got broken in 0f13cd3187192ba0cc2b043430de6e279e7b97c3. CC:libav-stable@libav.org
-rw-r--r--libavcodec/ffv1dec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index f9b094dab7..c4f73c726e 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -734,8 +734,8 @@ static int read_header(FFV1Context *f)
fs->slice_x /= f->num_h_slices;
fs->slice_y /= f->num_v_slices;
- fs->slice_width /= f->num_h_slices - fs->slice_x;
- fs->slice_height /= f->num_v_slices - fs->slice_y;
+ fs->slice_width = fs->slice_width / f->num_h_slices - fs->slice_x;
+ fs->slice_height = fs->slice_height / f->num_v_slices - fs->slice_y;
if ((unsigned)fs->slice_width > f->width ||
(unsigned)fs->slice_height > f->height)
return AVERROR_INVALIDDATA;