[FFmpeg-cvslog] ffv1: fix calculating slice dimensions for version 2

Anton Khirnov git at videolan.org
Thu Mar 14 04:47:33 CET 2013


ffmpeg | branch: release/1.1 | Anton Khirnov <anton at khirnov.net> | Tue Feb 19 08:15:07 2013 +0100| [d48da913733356f319931907ba7a0da0ccfd0363] | committer: Reinhard Tartler

ffv1: fix calculating slice dimensions for version 2

It got broken in 0f13cd3187192ba0cc2b043430de6e279e7b97c3.

CC:libav-stable at libav.org
(cherry picked from commit d243896987b8b2062d1faba4d8d6f0c62d2dbee9)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>

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

 libavcodec/ffv1dec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 72f255c..97e2bd5 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -735,8 +735,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;



More information about the ffmpeg-cvslog mailing list