libavcodec/binkaudio.c:326: error: Memory Leak
  memory dynamically allocated by call to `av_realloc()` at line 307, column 15 is not reachable after line 326, column 9.

libavcodec/binkaudio.c:288:1: start of procedure decode_frame()
286. }
287. 
288. static int decode_frame(AVCodecContext *avctx, void *data,
     ^
289.                         int *got_frame_ptr, AVPacket *avpkt)
290. {

libavcodec/binkaudio.c:291:5: 
289.                         int *got_frame_ptr, AVPacket *avpkt)
290. {
291.     BinkAudioContext *s = avctx->priv_data;
         ^
292.     AVFrame *frame      = data;
293.     BitstreamContext *bc = &s->bc;

libavcodec/binkaudio.c:292:5: 
290. {
291.     BinkAudioContext *s = avctx->priv_data;
292.     AVFrame *frame      = data;
         ^
293.     BitstreamContext *bc = &s->bc;
294.     int ret, consumed = 0;

libavcodec/binkaudio.c:293:5: 
291.     BinkAudioContext *s = avctx->priv_data;
292.     AVFrame *frame      = data;
293.     BitstreamContext *bc = &s->bc;
         ^
294.     int ret, consumed = 0;
295. 

libavcodec/binkaudio.c:294:5: 
292.     AVFrame *frame      = data;
293.     BitstreamContext *bc = &s->bc;
294.     int ret, consumed = 0;
         ^
295. 
296.     if (!bitstream_bits_left(bc)) {

libavcodec/binkaudio.c:296:10: 
294.     int ret, consumed = 0;
295. 
296.     if (!bitstream_bits_left(bc)) {
              ^
297.         uint8_t *buf;
298.         /* handle end-of-stream */

libavcodec/bitstream.h:125:1: start of procedure bitstream_bits_left()
  123. 
  124. /* Return the number of the bits left in a buffer. */
  125. static inline int bitstream_bits_left(const BitstreamContext *bc)
       ^
  126. {
  127.     return (bc->buffer - bc->ptr) * 8 + bc->size_in_bits + bc->bits_left;

libavcodec/bitstream.h:127:5: 
  125. static inline int bitstream_bits_left(const BitstreamContext *bc)
  126. {
  127.     return (bc->buffer - bc->ptr) * 8 + bc->size_in_bits + bc->bits_left;
           ^
  128. }
  129. 

libavcodec/bitstream.h:128:1: return from a call to bitstream_bits_left
  126. {
  127.     return (bc->buffer - bc->ptr) * 8 + bc->size_in_bits + bc->bits_left;
  128. }
       ^
  129. 
  130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)

libavcodec/binkaudio.c:296:10: Taking true branch
294.     int ret, consumed = 0;
295. 
296.     if (!bitstream_bits_left(bc)) {
              ^
297.         uint8_t *buf;
298.         /* handle end-of-stream */

libavcodec/binkaudio.c:299:14: Taking false branch
297.         uint8_t *buf;
298.         /* handle end-of-stream */
299.         if (!avpkt->size) {
                  ^
300.             *got_frame_ptr = 0;
301.             return 0;

libavcodec/binkaudio.c:303:13: Taking false branch
301.             return 0;
302.         }
303.         if (avpkt->size < 4) {
                 ^
304.             av_log(avctx, AV_LOG_ERROR, "Packet is too small\n");
305.             return AVERROR_INVALIDDATA;

libavcodec/binkaudio.c:307:9: 
305.             return AVERROR_INVALIDDATA;
306.         }
307.         buf = av_realloc(s->packet_buffer, avpkt->size + AV_INPUT_BUFFER_PADDING_SIZE);
             ^
308.         if (!buf)
309.             return AVERROR(ENOMEM);

libavutil/mem.c:107:1: start of procedure av_realloc()
  105. }
  106. 
  107. void *av_realloc(void *ptr, size_t size)
       ^
  108. {
  109.     /* let's disallow possibly ambiguous cases */

libavutil/mem.c:110:9: Taking false branch
  108. {
  109.     /* let's disallow possibly ambiguous cases */
  110.     if (size > (INT_MAX - 16))
               ^
  111.         return NULL;
  112. 

libavutil/mem.c:116:5: 
  114.     return _aligned_realloc(ptr, size, 32);
  115. #else
  116.     return realloc(ptr, size);
           ^
  117. #endif
  118. }

libavutil/mem.c:118:1: return from a call to av_realloc
  116.     return realloc(ptr, size);
  117. #endif
  118. }
       ^
  119. 
  120. int av_reallocp(void *ptr, size_t size)

libavcodec/binkaudio.c:308:14: Taking false branch
306.         }
307.         buf = av_realloc(s->packet_buffer, avpkt->size + AV_INPUT_BUFFER_PADDING_SIZE);
308.         if (!buf)
                  ^
309.             return AVERROR(ENOMEM);
310.         s->packet_buffer = buf;

libavcodec/binkaudio.c:310:9: 
308.         if (!buf)
309.             return AVERROR(ENOMEM);
310.         s->packet_buffer = buf;
             ^
311.         memcpy(s->packet_buffer, avpkt->data, avpkt->size);
312.         bitstream_init(bc, s->packet_buffer, avpkt->size * 8);

libavcodec/binkaudio.c:311:9: 
309.             return AVERROR(ENOMEM);
310.         s->packet_buffer = buf;
311.         memcpy(s->packet_buffer, avpkt->data, avpkt->size);
             ^
312.         bitstream_init(bc, s->packet_buffer, avpkt->size * 8);
313.         consumed = avpkt->size;

libavcodec/binkaudio.c:312:9: 
310.         s->packet_buffer = buf;
311.         memcpy(s->packet_buffer, avpkt->data, avpkt->size);
312.         bitstream_init(bc, s->packet_buffer, avpkt->size * 8);
             ^
313.         consumed = avpkt->size;
314. 

libavcodec/bitstream.h:76:1: start of procedure bitstream_init()
  74. /* Initialize BitstreamContext. Input buffer must have an additional zero
  75.  * padding of AV_INPUT_BUFFER_PADDING_SIZE bytes at the end. */
  76. static inline int bitstream_init(BitstreamContext *bc, const uint8_t *buffer,
      ^
  77.                                  unsigned bit_size)
  78. {

libavcodec/bitstream.h:81:9: Taking true branch
  79.     unsigned buffer_size;
  80. 
  81.     if (bit_size > INT_MAX - 7 || !buffer) {
              ^
  82.         buffer        =
  83.         bc->buffer    =

libavcodec/bitstream.h:82:9: 
  80. 
  81.     if (bit_size > INT_MAX - 7 || !buffer) {
  82.         buffer        =
              ^
  83.         bc->buffer    =
  84.         bc->ptr       = NULL;

libavcodec/bitstream.h:85:9: 
  83.         bc->buffer    =
  84.         bc->ptr       = NULL;
  85.         bc->bits_left = 0;
              ^
  86.         return AVERROR_INVALIDDATA;
  87.     }

libavcodec/bitstream.h:86:9: 
  84.         bc->ptr       = NULL;
  85.         bc->bits_left = 0;
  86.         return AVERROR_INVALIDDATA;
              ^
  87.     }
  88. 

libavcodec/bitstream.h:101:1: return from a call to bitstream_init
   99. 
  100.     return 0;
  101. }
       ^
  102. 
  103. /* Initialize BitstreamContext with buffer size in bytes instead of bits. */

libavcodec/binkaudio.c:313:9: 
311.         memcpy(s->packet_buffer, avpkt->data, avpkt->size);
312.         bitstream_init(bc, s->packet_buffer, avpkt->size * 8);
313.         consumed = avpkt->size;
             ^
314. 
315.         /* skip reported size */

libavcodec/binkaudio.c:316:9: 
314. 
315.         /* skip reported size */
316.         bitstream_skip(bc, 32);
             ^
317.     }
318. 

libavcodec/bitstream.h:241:1: start of procedure bitstream_skip()
  239. 
  240. /* Skip n bits in the buffer. */
  241. static inline void bitstream_skip(BitstreamContext *bc, unsigned n)
       ^
  242. {
  243.     if (n <= bc->bits_left)

libavcodec/bitstream.h:243:9: Taking false branch
  241. static inline void bitstream_skip(BitstreamContext *bc, unsigned n)
  242. {
  243.     if (n <= bc->bits_left)
               ^
  244.         skip_remaining(bc, n);
  245.     else {

libavcodec/bitstream.h:246:9: 
  244.         skip_remaining(bc, n);
  245.     else {
  246.         n -= bc->bits_left;
               ^
  247.         skip_remaining(bc, bc->bits_left);
  248.         if (n >= 64) {

libavcodec/bitstream.h:247:9: 
  245.     else {
  246.         n -= bc->bits_left;
  247.         skip_remaining(bc, bc->bits_left);
               ^
  248.         if (n >= 64) {
  249.             unsigned skip = n / 8;

libavcodec/bitstream.h:230:1: start of procedure skip_remaining()
    228. }
    229. 
    230. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
         ^
    231. {
    232. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:233:5: 
    231. {
    232. #ifdef BITSTREAM_READER_LE
    233.     bc->bits >>= n;
             ^
    234. #else
    235.     bc->bits <<= n;

libavcodec/bitstream.h:237:5: 
    235.     bc->bits <<= n;
    236. #endif
    237.     bc->bits_left -= n;
             ^
    238. }
    239. 

libavcodec/bitstream.h:238:1: return from a call to skip_remaining
    236. #endif
    237.     bc->bits_left -= n;
    238. }
         ^
    239. 
    240. /* Skip n bits in the buffer. */

libavcodec/bitstream.h:248:13: Taking false branch
  246.         n -= bc->bits_left;
  247.         skip_remaining(bc, bc->bits_left);
  248.         if (n >= 64) {
                   ^
  249.             unsigned skip = n / 8;
  250. 

libavcodec/bitstream.h:254:9: 
  252.             bc->ptr += skip;
  253.         }
  254.         refill_64(bc);
               ^
  255.         if (n)
  256.             skip_remaining(bc, n);

libavcodec/bitstream.h:46:1: start of procedure refill_64()
    44. } BitstreamContext;
    45. 
    46. static inline void refill_64(BitstreamContext *bc)
        ^
    47. {
    48.     if (bc->ptr >= bc->buffer_end)

libavcodec/bitstream.h:48:9: Taking true branch
    46. static inline void refill_64(BitstreamContext *bc)
    47. {
    48.     if (bc->ptr >= bc->buffer_end)
                ^
    49.         return;
    50. 

libavcodec/bitstream.h:49:9: 
    47. {
    48.     if (bc->ptr >= bc->buffer_end)
    49.         return;
                ^
    50. 
    51. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:58:1: return from a call to refill_64
    56.     bc->ptr       += 8;
    57.     bc->bits_left  = 64;
    58. }
        ^
    59. 
    60. static inline void refill_32(BitstreamContext *bc)

libavcodec/bitstream.h:255:13: Taking true branch
  253.         }
  254.         refill_64(bc);
  255.         if (n)
                   ^
  256.             skip_remaining(bc, n);
  257.     }

libavcodec/bitstream.h:256:13: 
  254.         refill_64(bc);
  255.         if (n)
  256.             skip_remaining(bc, n);
                   ^
  257.     }
  258. }

libavcodec/bitstream.h:230:1: start of procedure skip_remaining()
    228. }
    229. 
    230. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
         ^
    231. {
    232. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:233:5: 
    231. {
    232. #ifdef BITSTREAM_READER_LE
    233.     bc->bits >>= n;
             ^
    234. #else
    235.     bc->bits <<= n;

libavcodec/bitstream.h:237:5: 
    235.     bc->bits <<= n;
    236. #endif
    237.     bc->bits_left -= n;
             ^
    238. }
    239. 

libavcodec/bitstream.h:238:1: return from a call to skip_remaining
    236. #endif
    237.     bc->bits_left -= n;
    238. }
         ^
    239. 
    240. /* Skip n bits in the buffer. */

libavcodec/bitstream.h:243:5: 
  241. static inline void bitstream_skip(BitstreamContext *bc, unsigned n)
  242. {
  243.     if (n <= bc->bits_left)
           ^
  244.         skip_remaining(bc, n);
  245.     else {

libavcodec/bitstream.h:258:1: return from a call to bitstream_skip
  256.             skip_remaining(bc, n);
  257.     }
  258. }
       ^
  259. 
  260. /* Seek to the given bit position. */

libavcodec/binkaudio.c:320:5: 
318. 
319.     /* get output buffer */
320.     frame->nb_samples = s->frame_len;
         ^
321.     if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
322.         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");

libavcodec/binkaudio.c:321:9: Taking false branch
319.     /* get output buffer */
320.     frame->nb_samples = s->frame_len;
321.     if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
             ^
322.         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
323.         return ret;

libavcodec/binkaudio.c:327:22: Condition is false
325. 
326.     if (decode_block(s, (float **)frame->extended_data,
327.                      avctx->codec->id == AV_CODEC_ID_BINKAUDIO_DCT)) {
                          ^
328.         av_log(avctx, AV_LOG_ERROR, "Incomplete packet\n");
329.         return AVERROR_INVALIDDATA;

libavcodec/binkaudio.c:326:9: Skipping decode_block(): empty list of specs
324.     }
325. 
326.     if (decode_block(s, (float **)frame->extended_data,
             ^
327.                      avctx->codec->id == AV_CODEC_ID_BINKAUDIO_DCT)) {
328.         av_log(avctx, AV_LOG_ERROR, "Incomplete packet\n");
