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

libavutil/mem.c:162:1: start of procedure av_reallocp_array()
160. }
161. 
162. int av_reallocp_array(void *ptr, size_t nmemb, size_t size)
     ^
163. {
164.     void *val;

libavutil/mem.c:166:10: Taking false branch
164.     void *val;
165. 
166.     if (!size || nmemb >= INT_MAX / size)
              ^
167.         return AVERROR(ENOMEM);
168.     if (!nmemb) {

libavutil/mem.c:166:18: Taking false branch
164.     void *val;
165. 
166.     if (!size || nmemb >= INT_MAX / size)
                      ^
167.         return AVERROR(ENOMEM);
168.     if (!nmemb) {

libavutil/mem.c:168:10: Taking false branch
166.     if (!size || nmemb >= INT_MAX / size)
167.         return AVERROR(ENOMEM);
168.     if (!nmemb) {
              ^
169.         av_freep(ptr);
170.         return 0;

libavutil/mem.c:173:5: 
171.     }
172. 
173.     memcpy(&val, ptr, sizeof(val));
         ^
174.     val = av_realloc(val, nmemb * size);
175.     if (!val) {

libavutil/mem.c:174:5: 
172. 
173.     memcpy(&val, ptr, sizeof(val));
174.     val = av_realloc(val, nmemb * size);
         ^
175.     if (!val) {
176.         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:175:10: Taking false branch
173.     memcpy(&val, ptr, sizeof(val));
174.     val = av_realloc(val, nmemb * size);
175.     if (!val) {
              ^
176.         av_freep(ptr);
177.         return AVERROR(ENOMEM);

libavutil/mem.c:180:5: 
178.     }
179. 
180.     memcpy(ptr, &val, sizeof(val));
         ^
181.     return 0;
182. }

libavutil/mem.c:181:5: 
179. 
180.     memcpy(ptr, &val, sizeof(val));
181.     return 0;
         ^
182. }
183. 

libavutil/mem.c:182:1: return from a call to av_reallocp_array
180.     memcpy(ptr, &val, sizeof(val));
181.     return 0;
182. }
     ^
183. 
184. void av_free(void *ptr)
