mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 17:55:21 +00:00
avcodec/sonic: Don't hardcode sizeof(int) == 4
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
cba55c3353
commit
63f5f01226
@ -509,7 +509,7 @@ static int modified_levinson_durbin(int *window, int window_entries,
|
||||
if (!state)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
memcpy(state, window, 4* window_entries);
|
||||
memcpy(state, window, window_entries * sizeof(*state));
|
||||
|
||||
for (i = 0; i < out_entries; i++)
|
||||
{
|
||||
@ -761,7 +761,7 @@ static int sonic_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
break;
|
||||
}
|
||||
|
||||
memset(s->window, 0, 4* s->window_size);
|
||||
memset(s->window, 0, s->window_size * sizeof(*s->window));
|
||||
|
||||
for (i = 0; i < s->tail_size; i++)
|
||||
s->window[x++] = s->tail[i];
|
||||
|
Loading…
Reference in New Issue
Block a user