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

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

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

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

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

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

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

libavformat/matroskadec.c:882:5: 
880.     uint8_t* pkt_data = NULL;
881.     int pkt_size = isize;
882.     int result = 0;
         ^
883.     int olen;
884. 

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

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

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

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

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

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

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

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

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

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

libavutil/mem.c:119:1: start of procedure av_realloc()
  117. }
  118. 
  119. void *av_realloc(void *ptr, unsigned int size)
       ^
  120. {
  121. #if CONFIG_MEMALIGN_HACK

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

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

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

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

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

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

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

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

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

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

libavutil/mem.c:119:1: start of procedure av_realloc()
  117. }
  118. 
  119. void *av_realloc(void *ptr, unsigned int size)
       ^
  120. {
  121. #if CONFIG_MEMALIGN_HACK

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

libavutil/mem.c:127:9: 
  125.     /* let's disallow possible ambiguous cases */
  126.     if(size > (INT_MAX-16) )
  127.         return NULL;
               ^
  128. 
  129. #if CONFIG_MEMALIGN_HACK

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