libavformat/matroskadec.c:904: error: Memory Leak
  memory dynamically allocated by call to `av_realloc()` at line 904, column 24 is not reachable after line 904, column 13.

libavformat/matroskadec.c:871:1: start of procedure matroska_decode_buffer()
869. }
870. 
871. static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
     ^
872.                                   MatroskaTrack *track)
873. {

libavformat/matroskadec.c:874:5: 
872.                                   MatroskaTrack *track)
873. {
874.     MatroskaTrackEncoding *encodings = track->encodings.elem;
         ^
875.     uint8_t* data = *buf;
876.     int isize = *buf_size;

libavformat/matroskadec.c:875:5: 
873. {
874.     MatroskaTrackEncoding *encodings = track->encodings.elem;
875.     uint8_t* data = *buf;
         ^
876.     int isize = *buf_size;
877.     uint8_t* pkt_data = NULL;

libavformat/matroskadec.c:876:5: 
874.     MatroskaTrackEncoding *encodings = track->encodings.elem;
875.     uint8_t* data = *buf;
876.     int isize = *buf_size;
         ^
877.     uint8_t* pkt_data = NULL;
878.     int pkt_size = isize;

libavformat/matroskadec.c:877:5: 
875.     uint8_t* data = *buf;
876.     int isize = *buf_size;
877.     uint8_t* pkt_data = NULL;
         ^
878.     int pkt_size = isize;
879.     int result = 0;

libavformat/matroskadec.c:878:5: 
876.     int isize = *buf_size;
877.     uint8_t* pkt_data = NULL;
878.     int pkt_size = isize;
         ^
879.     int result = 0;
880.     int olen;

libavformat/matroskadec.c:879:5: 
877.     uint8_t* pkt_data = NULL;
878.     int pkt_size = isize;
879.     int result = 0;
         ^
880.     int olen;
881. 

libavformat/matroskadec.c:882:5: 
880.     int olen;
881. 
882.     switch (encodings[0].compression.algo) {
         ^
883.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
884.         return encodings[0].compression.settings.size;

libavformat/matroskadec.c:883:5: Switch condition is false. Skipping switch case
881. 
882.     switch (encodings[0].compression.algo) {
883.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
         ^
884.         return encodings[0].compression.settings.size;
885.     case MATROSKA_TRACK_ENCODING_COMP_LZO:

libavformat/matroskadec.c:885:5: Switch condition is false. Skipping switch case
883.     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
884.         return encodings[0].compression.settings.size;
885.     case MATROSKA_TRACK_ENCODING_COMP_LZO:
         ^
886.         do {
887.             olen = pkt_size *= 3;

libavformat/matroskadec.c:896:5: Switch condition is true. Entering switch case
894.         break;
895. #if CONFIG_ZLIB
896.     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
         ^
897.         z_stream zstream = {0};
898.         if (inflateInit(&zstream) != Z_OK)

libavformat/matroskadec.c:897:9: 
895. #if CONFIG_ZLIB
896.     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
897.         z_stream zstream = {0};
             ^
898.         if (inflateInit(&zstream) != Z_OK)
899.             return -1;

libavformat/matroskadec.c:898:13: Taking false branch
896.     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
897.         z_stream zstream = {0};
898.         if (inflateInit(&zstream) != Z_OK)
                 ^
899.             return -1;
900.         zstream.next_in = data;

libavformat/matroskadec.c:900:9: 
898.         if (inflateInit(&zstream) != Z_OK)
899.             return -1;
900.         zstream.next_in = data;
             ^
901.         zstream.avail_in = isize;
902.         do {

libavformat/matroskadec.c:901:9: 
899.             return -1;
900.         zstream.next_in = data;
901.         zstream.avail_in = isize;
             ^
902.         do {
903.             pkt_size *= 3;

libavformat/matroskadec.c:903:13: 
901.         zstream.avail_in = isize;
902.         do {
903.             pkt_size *= 3;
                 ^
904.             pkt_data = av_realloc(pkt_data, pkt_size);
905.             zstream.avail_out = pkt_size - zstream.total_out;

libavformat/matroskadec.c:904:13: 
902.         do {
903.             pkt_size *= 3;
904.             pkt_data = av_realloc(pkt_data, pkt_size);
                 ^
905.             zstream.avail_out = pkt_size - zstream.total_out;
906.             zstream.next_out = pkt_data + zstream.total_out;

libavutil/mem.c:102:1: start of procedure av_realloc()
  100. }
  101. 
  102. void *av_realloc(void *ptr, unsigned int size)
       ^
  103. {
  104. #if CONFIG_MEMALIGN_HACK

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

libavutil/mem.c:118:5: 
  116.     return (char*)realloc((char*)ptr - diff, size + diff) + diff;
  117. #else
  118.     return realloc(ptr, size);
           ^
  119. #endif
  120. }

libavutil/mem.c:120:1: return from a call to av_realloc
  118.     return realloc(ptr, size);
  119. #endif
  120. }
       ^
  121. 
  122. void av_free(void *ptr)

libavformat/matroskadec.c:905:13: 
903.             pkt_size *= 3;
904.             pkt_data = av_realloc(pkt_data, pkt_size);
905.             zstream.avail_out = pkt_size - zstream.total_out;
                 ^
906.             zstream.next_out = pkt_data + zstream.total_out;
907.             result = inflate(&zstream, Z_NO_FLUSH);

libavformat/matroskadec.c:906:13: 
904.             pkt_data = av_realloc(pkt_data, pkt_size);
905.             zstream.avail_out = pkt_size - zstream.total_out;
906.             zstream.next_out = pkt_data + zstream.total_out;
                 ^
907.             result = inflate(&zstream, Z_NO_FLUSH);
908.         } while (result==Z_OK && pkt_size<10000000);

libavformat/matroskadec.c:907:13: Skipping inflate(): method has no implementation
905.             zstream.avail_out = pkt_size - zstream.total_out;
906.             zstream.next_out = pkt_data + zstream.total_out;
907.             result = inflate(&zstream, Z_NO_FLUSH);
                 ^
908.         } while (result==Z_OK && pkt_size<10000000);
909.         pkt_size = zstream.total_out;

libavformat/matroskadec.c:908:18: Loop condition is true. Entering loop body
906.             zstream.next_out = pkt_data + zstream.total_out;
907.             result = inflate(&zstream, Z_NO_FLUSH);
908.         } while (result==Z_OK && pkt_size<10000000);
                      ^
909.         pkt_size = zstream.total_out;
910.         inflateEnd(&zstream);

libavformat/matroskadec.c:908:34: Loop condition is true. Entering loop body
906.             zstream.next_out = pkt_data + zstream.total_out;
907.             result = inflate(&zstream, Z_NO_FLUSH);
908.         } while (result==Z_OK && pkt_size<10000000);
                                      ^
909.         pkt_size = zstream.total_out;
910.         inflateEnd(&zstream);

libavformat/matroskadec.c:903:13: 
901.         zstream.avail_in = isize;
902.         do {
903.             pkt_size *= 3;
                 ^
904.             pkt_data = av_realloc(pkt_data, pkt_size);
905.             zstream.avail_out = pkt_size - zstream.total_out;

libavformat/matroskadec.c:904:13: 
902.         do {
903.             pkt_size *= 3;
904.             pkt_data = av_realloc(pkt_data, pkt_size);
                 ^
905.             zstream.avail_out = pkt_size - zstream.total_out;
906.             zstream.next_out = pkt_data + zstream.total_out;

libavutil/mem.c:102:1: start of procedure av_realloc()
  100. }
  101. 
  102. void *av_realloc(void *ptr, unsigned int size)
       ^
  103. {
  104. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:109:8: Taking true branch
  107. 
  108.     /* let's disallow possible ambiguous cases */
  109.     if(size > (INT_MAX-16) )
              ^
  110.         return NULL;
  111. 

libavutil/mem.c:110:9: 
  108.     /* let's disallow possible ambiguous cases */
  109.     if(size > (INT_MAX-16) )
  110.         return NULL;
               ^
  111. 
  112. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:120:1: return from a call to av_realloc
  118.     return realloc(ptr, size);
  119. #endif
  120. }
       ^
  121. 
  122. void av_free(void *ptr)
