]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/alsdec.c
Merge commit '2cd4068071b9a8908823a3107f97e938211045ce'
[ffmpeg] / libavcodec / alsdec.c
index d7baa6eccb8baa700295558d6524346c74c5716d..524be227b3c95da3e261c57b30d4e4dd9f4d406e 100644 (file)
@@ -289,8 +289,10 @@ static av_cold int read_specific_config(ALSDecContext *ctx)
     ALSSpecificConfig *sconf = &ctx->sconf;
     AVCodecContext *avctx    = ctx->avctx;
     uint32_t als_id, header_size, trailer_size;
+    int ret;
 
-    init_get_bits(&gb, avctx->extradata, avctx->extradata_size * 8);
+    if ((ret = init_get_bits8(&gb, avctx->extradata, avctx->extradata_size)) < 0)
+        return ret;
 
     config_offset = avpriv_mpeg4audio_get_config(&m4ac, avctx->extradata,
                                                  avctx->extradata_size * 8, 1);