summaryrefslogtreecommitdiff
path: root/libavcodec/proresenc.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-07-01 13:38:12 +0100
committerMans Rullgard <mans@mansr.com>2012-07-01 20:38:14 +0100
commit1c2c64edac4bd2b65b6d2f8d1489eed40f8a5458 (patch)
treeeec295bc5c2f7d3f25dfd4851320f8a542289320 /libavcodec/proresenc.c
parent4ca6d206d1b5beea42c4290d2ee801aaf5cd31f0 (diff)
proresenc: make a variable local to the loop where it is used
This moves the mbs_per_slice declaration inside the only loop where it is used. Fixes a dead assignment. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/proresenc.c')
-rw-r--r--libavcodec/proresenc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c
index bee49ee60a..f82153309b 100644
--- a/libavcodec/proresenc.c
+++ b/libavcodec/proresenc.c
@@ -724,7 +724,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
int sizes[4] = { 0 };
int slice_hdr_size = 2 + 2 * (ctx->num_planes - 1);
int frame_size, picture_size, slice_size;
- int mbs_per_slice = ctx->mbs_per_slice;
int pkt_size, ret;
*avctx->coded_frame = *pic;
@@ -792,7 +791,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
for (y = 0; y < ctx->mb_height; y++) {
- mbs_per_slice = ctx->mbs_per_slice;
+ int mbs_per_slice = ctx->mbs_per_slice;
for (x = mb = 0; x < ctx->mb_width; x += mbs_per_slice, mb++) {
q = ctx->force_quant ? ctx->force_quant
: ctx->slice_q[mb + y * ctx->slices_width];