]> git.sesse.net Git - ffmpeg/commitdiff
lavc/alac: Make a variable unsigned.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Thu, 18 Apr 2019 11:51:07 +0000 (13:51 +0200)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Fri, 19 Apr 2019 12:01:04 +0000 (14:01 +0200)
Fixes a bogus compiler warning (max_samples_per_frame is checked):
libavcodec/alac.c: In function ‘allocate_buffers’:
./libavutil/internal.h:142:9: warning: argument 1 value ‘18446744073709551552’ exceeds maximum object size 9223372036854775807

libavcodec/alac.c

index d6b87db734ff33a6ad69944d2c8ef43341dc58e9..2f443406615b3fa5f2a5c31ba551768560e6f28d 100644 (file)
@@ -486,7 +486,7 @@ static av_cold int alac_decode_close(AVCodecContext *avctx)
 static int allocate_buffers(ALACContext *alac)
 {
     int ch;
-    int buf_size = alac->max_samples_per_frame * sizeof(int32_t);
+    unsigned buf_size = alac->max_samples_per_frame * sizeof(int32_t);
 
     for (ch = 0; ch < 2; ch++) {
         alac->predict_error_buffer[ch]  = NULL;