libavutil/mem.c:168: error: Memory Leak
  memory dynamically allocated by call to `av_realloc()` at line 160, column 11 is not reachable after line 168, column 1.

libavutil/mem.c:148:1: start of procedure av_reallocp_array()
146. }
147. 
148. int av_reallocp_array(void *ptr, size_t nmemb, size_t size)
     ^
149. {
150.     void *val;

libavutil/mem.c:152:10: Taking false branch
150.     void *val;
151. 
152.     if (!size || nmemb >= INT_MAX / size)
              ^
153.         return AVERROR(ENOMEM);
154.     if (!nmemb) {

libavutil/mem.c:152:18: Taking false branch
150.     void *val;
151. 
152.     if (!size || nmemb >= INT_MAX / size)
                      ^
153.         return AVERROR(ENOMEM);
154.     if (!nmemb) {

libavutil/mem.c:154:10: Taking false branch
152.     if (!size || nmemb >= INT_MAX / size)
153.         return AVERROR(ENOMEM);
154.     if (!nmemb) {
              ^
155.         av_freep(ptr);
156.         return 0;

libavutil/mem.c:159:5: 
157.     }
158. 
159.     memcpy(&val, ptr, sizeof(val));
         ^
160.     val = av_realloc(val, nmemb * size);
161.     if (!val) {

libavutil/mem.c:160:5: 
158. 
159.     memcpy(&val, ptr, sizeof(val));
160.     val = av_realloc(val, nmemb * size);
         ^
161.     if (!val) {
162.         av_freep(ptr);

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)

libavutil/mem.c:161:10: Taking false branch
159.     memcpy(&val, ptr, sizeof(val));
160.     val = av_realloc(val, nmemb * size);
161.     if (!val) {
              ^
162.         av_freep(ptr);
163.         return AVERROR(ENOMEM);

libavutil/mem.c:166:5: 
164.     }
165. 
166.     memcpy(ptr, &val, sizeof(val));
         ^
167.     return 0;
168. }

libavutil/mem.c:167:5: 
165. 
166.     memcpy(ptr, &val, sizeof(val));
167.     return 0;
         ^
168. }
169. 

libavutil/mem.c:168:1: return from a call to av_reallocp_array
166.     memcpy(ptr, &val, sizeof(val));
167.     return 0;
168. }
     ^
169. 
170. void av_free(void *ptr)
