mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-03-13 09:00:40 +08:00
avcodec/wmaenc: Fix shadowing
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -379,7 +379,7 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
const AVFrame *frame, int *got_packet_ptr)
|
||||
{
|
||||
WMACodecContext *s = avctx->priv_data;
|
||||
int i, total_gain, ret, error;
|
||||
int total_gain, ret, error;
|
||||
|
||||
s->block_len_bits = s->frame_len_bits; // required by non variable block len
|
||||
s->block_len = 1 << s->block_len_bits;
|
||||
@@ -391,9 +391,8 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
|
||||
if (s->ms_stereo) {
|
||||
float a, b;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < s->block_len; i++) {
|
||||
for (int i = 0; i < s->block_len; i++) {
|
||||
a = s->coefs[0][i] * 0.5;
|
||||
b = s->coefs[1][i] * 0.5;
|
||||
s->coefs[0][i] = a + b;
|
||||
@@ -405,7 +404,7 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
return ret;
|
||||
|
||||
total_gain = 128;
|
||||
for (i = 64; i; i >>= 1) {
|
||||
for (int i = 64; i; i >>= 1) {
|
||||
error = encode_frame(s, s->coefs, avpkt->data, avpkt->size,
|
||||
total_gain - i);
|
||||
if (error <= 0)
|
||||
@@ -419,9 +418,9 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
av_assert0((put_bits_count(&s->pb) & 7) == 0);
|
||||
i = avctx->block_align - put_bytes_count(&s->pb, 0);
|
||||
av_assert0(i>=0);
|
||||
while(i--)
|
||||
int pad = avctx->block_align - put_bytes_count(&s->pb, 0);
|
||||
av_assert0(pad >= 0);
|
||||
while (pad--)
|
||||
put_bits(&s->pb, 8, 'N');
|
||||
|
||||
flush_put_bits(&s->pb);
|
||||
|
||||
Reference in New Issue
Block a user