summaryrefslogtreecommitdiff
path: root/libavcodec/rpza.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/rpza.c')
-rw-r--r--libavcodec/rpza.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
index 1c429f6244..2be26346a2 100644
--- a/libavcodec/rpza.c
+++ b/libavcodec/rpza.c
@@ -106,7 +106,7 @@ static void rpza_decode_stream(RpzaContext *s)
chunk_size = s->size;
/* Number of 4x4 blocks in frame. */
- total_blocks = (s->avctx->width * s->avctx->height) / (4 * 4);
+ total_blocks = ((s->avctx->width + 3) / 4) * ((s->avctx->height + 3) / 4);
/* Process chunk data */
while (stream_ptr < chunk_size) {