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

libavcodec/binkaudio.c:310:1: start of procedure decode_frame()
308. }
309. 
310. static int decode_frame(AVCodecContext *avctx, void *data,
     ^
311.                         int *got_frame_ptr, AVPacket *avpkt)
312. {

libavcodec/binkaudio.c:313:5: 
311.                         int *got_frame_ptr, AVPacket *avpkt)
312. {
313.     BinkAudioContext *s = avctx->priv_data;
         ^
314.     int16_t *samples;
315.     GetBitContext *gb = &s->gb;

libavcodec/binkaudio.c:315:5: 
313.     BinkAudioContext *s = avctx->priv_data;
314.     int16_t *samples;
315.     GetBitContext *gb = &s->gb;
         ^
316.     int ret, consumed = 0;
317. 

libavcodec/binkaudio.c:316:5: 
314.     int16_t *samples;
315.     GetBitContext *gb = &s->gb;
316.     int ret, consumed = 0;
         ^
317. 
318.     if (!get_bits_left(gb)) {

libavcodec/binkaudio.c:318:10: 
316.     int ret, consumed = 0;
317. 
318.     if (!get_bits_left(gb)) {
              ^
319.         uint8_t *buf;
320.         /* handle end-of-stream */

libavcodec/get_bits.h:536:1: start of procedure get_bits_left()
  534. }
  535. 
  536. static inline int get_bits_left(GetBitContext *gb)
       ^
  537. {
  538.     return gb->size_in_bits - get_bits_count(gb);

libavcodec/get_bits.h:538:5: 
  536. static inline int get_bits_left(GetBitContext *gb)
  537. {
  538.     return gb->size_in_bits - get_bits_count(gb);
           ^
  539. }
  540. 

libavcodec/get_bits.h:169:1: start of procedure get_bits_count()
    167. #   define GET_CACHE(name, gb) ((uint32_t)name##_cache)
    168. 
    169. static inline int get_bits_count(const GetBitContext *s){
         ^
    170.     return s->index;
    171. }

libavcodec/get_bits.h:170:5: 
    168. 
    169. static inline int get_bits_count(const GetBitContext *s){
    170.     return s->index;
             ^
    171. }
    172. 

libavcodec/get_bits.h:171:1: return from a call to get_bits_count
    169. static inline int get_bits_count(const GetBitContext *s){
    170.     return s->index;
    171. }
         ^
    172. 
    173. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/get_bits.h:539:1: return from a call to get_bits_left
  537. {
  538.     return gb->size_in_bits - get_bits_count(gb);
  539. }
       ^
  540. 
  541. //#define TRACE

libavcodec/binkaudio.c:318:10: Taking true branch
316.     int ret, consumed = 0;
317. 
318.     if (!get_bits_left(gb)) {
              ^
319.         uint8_t *buf;
320.         /* handle end-of-stream */

libavcodec/binkaudio.c:321:14: Taking false branch
319.         uint8_t *buf;
320.         /* handle end-of-stream */
321.         if (!avpkt->size) {
                  ^
322.             *got_frame_ptr = 0;
323.             return 0;

libavcodec/binkaudio.c:325:13: Taking false branch
323.             return 0;
324.         }
325.         if (avpkt->size < 4) {
                 ^
326.             av_log(avctx, AV_LOG_ERROR, "Packet is too small\n");
327.             return AVERROR_INVALIDDATA;

libavcodec/binkaudio.c:329:9: 
327.             return AVERROR_INVALIDDATA;
328.         }
329.         buf = av_realloc(s->packet_buffer, avpkt->size + FF_INPUT_BUFFER_PADDING_SIZE);
             ^
330.         if (!buf)
331.             return AVERROR(ENOMEM);

libavutil/mem.c:117:1: start of procedure av_realloc()
  115. }
  116. 
  117. void *av_realloc(void *ptr, size_t size)
       ^
  118. {
  119. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:124:8: Taking false branch
  122. 
  123.     /* let's disallow possible ambiguous cases */
  124.     if(size > (INT_MAX-16) )
              ^
  125.         return NULL;
  126. 

libavutil/mem.c:133:5: 
  131.     return (char*)realloc((char*)ptr - diff, size + diff) + diff;
  132. #else
  133.     return realloc(ptr, size);
           ^
  134. #endif
  135. }

libavutil/mem.c:135:1: return from a call to av_realloc
  133.     return realloc(ptr, size);
  134. #endif
  135. }
       ^
  136. 
  137. void av_free(void *ptr)

libavcodec/binkaudio.c:330:14: Taking false branch
328.         }
329.         buf = av_realloc(s->packet_buffer, avpkt->size + FF_INPUT_BUFFER_PADDING_SIZE);
330.         if (!buf)
                  ^
331.             return AVERROR(ENOMEM);
332.         s->packet_buffer = buf;

libavcodec/binkaudio.c:332:9: 
330.         if (!buf)
331.             return AVERROR(ENOMEM);
332.         s->packet_buffer = buf;
             ^
333.         memcpy(s->packet_buffer, avpkt->data, avpkt->size);
334.         init_get_bits(gb, s->packet_buffer, avpkt->size * 8);

libavcodec/binkaudio.c:333:9: 
331.             return AVERROR(ENOMEM);
332.         s->packet_buffer = buf;
333.         memcpy(s->packet_buffer, avpkt->data, avpkt->size);
             ^
334.         init_get_bits(gb, s->packet_buffer, avpkt->size * 8);
335.         consumed = avpkt->size;

libavcodec/binkaudio.c:334:9: 
332.         s->packet_buffer = buf;
333.         memcpy(s->packet_buffer, avpkt->data, avpkt->size);
334.         init_get_bits(gb, s->packet_buffer, avpkt->size * 8);
             ^
335.         consumed = avpkt->size;
336. 

libavcodec/get_bits.h:383:1: start of procedure init_get_bits()
  381.  * responsible for checking for the buffer end yourself (take advantage of the padding)!
  382.  */
  383. static inline void init_get_bits(GetBitContext *s,
       ^
  384.                    const uint8_t *buffer, int bit_size)
  385. {

libavcodec/get_bits.h:386:5: 
  384.                    const uint8_t *buffer, int bit_size)
  385. {
  386.     int buffer_size = (bit_size+7)>>3;
           ^
  387.     if (buffer_size < 0 || bit_size < 0) {
  388.         buffer_size = bit_size = 0;

libavcodec/get_bits.h:387:9: Taking false branch
  385. {
  386.     int buffer_size = (bit_size+7)>>3;
  387.     if (buffer_size < 0 || bit_size < 0) {
               ^
  388.         buffer_size = bit_size = 0;
  389.         buffer = NULL;

libavcodec/get_bits.h:387:28: Taking false branch
  385. {
  386.     int buffer_size = (bit_size+7)>>3;
  387.     if (buffer_size < 0 || bit_size < 0) {
                                  ^
  388.         buffer_size = bit_size = 0;
  389.         buffer = NULL;

libavcodec/get_bits.h:392:5: 
  390.     }
  391. 
  392.     s->buffer       = buffer;
           ^
  393.     s->size_in_bits = bit_size;
  394.     s->buffer_end   = buffer + buffer_size;

libavcodec/get_bits.h:393:5: 
  391. 
  392.     s->buffer       = buffer;
  393.     s->size_in_bits = bit_size;
           ^
  394.     s->buffer_end   = buffer + buffer_size;
  395. #ifdef ALT_BITSTREAM_READER

libavcodec/get_bits.h:394:5: 
  392.     s->buffer       = buffer;
  393.     s->size_in_bits = bit_size;
  394.     s->buffer_end   = buffer + buffer_size;
           ^
  395. #ifdef ALT_BITSTREAM_READER
  396.     s->index        = 0;

libavcodec/get_bits.h:396:5: 
  394.     s->buffer_end   = buffer + buffer_size;
  395. #ifdef ALT_BITSTREAM_READER
  396.     s->index        = 0;
           ^
  397. #elif defined A32_BITSTREAM_READER
  398.     s->buffer_ptr   = (uint32_t*)((intptr_t)buffer & ~3);

libavcodec/get_bits.h:402:1: return from a call to init_get_bits
  400.     skip_bits_long(s, 0);
  401. #endif
  402. }
       ^
  403. 
  404. static inline void align_get_bits(GetBitContext *s)

libavcodec/binkaudio.c:335:9: 
333.         memcpy(s->packet_buffer, avpkt->data, avpkt->size);
334.         init_get_bits(gb, s->packet_buffer, avpkt->size * 8);
335.         consumed = avpkt->size;
             ^
336. 
337.         /* skip reported size */

libavcodec/binkaudio.c:338:9: 
336. 
337.         /* skip reported size */
338.         skip_bits_long(gb, 32);
             ^
339.     }
340. 

libavcodec/get_bits.h:173:1: start of procedure skip_bits_long()
  171. }
  172. 
  173. static inline void skip_bits_long(GetBitContext *s, int n){
       ^
  174.     s->index += n;
  175. }

libavcodec/get_bits.h:174:5: 
  172. 
  173. static inline void skip_bits_long(GetBitContext *s, int n){
  174.     s->index += n;
           ^
  175. }
  176. 

libavcodec/get_bits.h:175:1: return from a call to skip_bits_long
  173. static inline void skip_bits_long(GetBitContext *s, int n){
  174.     s->index += n;
  175. }
       ^
  176. 
  177. #elif defined A32_BITSTREAM_READER

libavcodec/binkaudio.c:342:5: 
340. 
341.     /* get output buffer */
342.     s->frame.nb_samples = s->block_size / avctx->channels;
         ^
343.     if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
344.         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");

libavcodec/binkaudio.c:343:9: Taking false branch
341.     /* get output buffer */
342.     s->frame.nb_samples = s->block_size / avctx->channels;
343.     if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
             ^
344.         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
345.         return ret;

libavcodec/binkaudio.c:347:5: 
345.         return ret;
346.     }
347.     samples = (int16_t *)s->frame.data[0];
         ^
348. 
349.     if (decode_block(s, samples, avctx->codec->id == CODEC_ID_BINKAUDIO_DCT)) {

libavcodec/binkaudio.c:349:34: Condition is false
347.     samples = (int16_t *)s->frame.data[0];
348. 
349.     if (decode_block(s, samples, avctx->codec->id == CODEC_ID_BINKAUDIO_DCT)) {
                                      ^
350.         av_log(avctx, AV_LOG_ERROR, "Incomplete packet\n");
351.         return AVERROR_INVALIDDATA;

libavcodec/binkaudio.c:349:9: Skipping decode_block(): empty list of specs
347.     samples = (int16_t *)s->frame.data[0];
348. 
349.     if (decode_block(s, samples, avctx->codec->id == CODEC_ID_BINKAUDIO_DCT)) {
             ^
350.         av_log(avctx, AV_LOG_ERROR, "Incomplete packet\n");
351.         return AVERROR_INVALIDDATA;
