libavutil/buffer.c:196: error: Memory Leak
  memory dynamically allocated by call to `av_realloc()` at line 156, column 25 is not reachable after line 196, column 1.

libavutil/buffer.c:148:1: start of procedure av_buffer_realloc()
146. }
147. 
148. int av_buffer_realloc(AVBufferRef **pbuf, int size)
     ^
149. {
150.     AVBufferRef *buf = *pbuf;

libavutil/buffer.c:150:5: 
148. int av_buffer_realloc(AVBufferRef **pbuf, int size)
149. {
150.     AVBufferRef *buf = *pbuf;
         ^
151.     uint8_t *tmp;
152. 

libavutil/buffer.c:153:10: Taking true branch
151.     uint8_t *tmp;
152. 
153.     if (!buf) {
              ^
154.         /* allocate a new buffer with av_realloc(), so it will be reallocatable
155.          * later */

libavutil/buffer.c:156:9: 
154.         /* allocate a new buffer with av_realloc(), so it will be reallocatable
155.          * later */
156.         uint8_t *data = av_realloc(NULL, size);
             ^
157.         if (!data)
158.             return AVERROR(ENOMEM);

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/buffer.c:157:14: Taking false branch
155.          * later */
156.         uint8_t *data = av_realloc(NULL, size);
157.         if (!data)
                  ^
158.             return AVERROR(ENOMEM);
159. 

libavutil/buffer.c:160:9: Skipping av_buffer_create(): empty list of specs
158.             return AVERROR(ENOMEM);
159. 
160.         buf = av_buffer_create(data, size, av_buffer_default_free, NULL, 0);
             ^
161.         if (!buf) {
162.             av_freep(&data);

libavutil/buffer.c:161:14: Taking false branch
159. 
160.         buf = av_buffer_create(data, size, av_buffer_default_free, NULL, 0);
161.         if (!buf) {
                  ^
162.             av_freep(&data);
163.             return AVERROR(ENOMEM);

libavutil/buffer.c:166:9: 
164.         }
165. 
166.         buf->buffer->flags |= BUFFER_FLAG_REALLOCATABLE;
             ^
167.         *pbuf = buf;
168. 

libavutil/buffer.c:167:9: 
165. 
166.         buf->buffer->flags |= BUFFER_FLAG_REALLOCATABLE;
167.         *pbuf = buf;
             ^
168. 
169.         return 0;

libavutil/buffer.c:169:9: 
167.         *pbuf = buf;
168. 
169.         return 0;
             ^
170.     } else if (buf->size == size)
171.         return 0;

libavutil/buffer.c:196:1: return from a call to av_buffer_realloc
194.     buf->buffer->size = buf->size = size;
195.     return 0;
196. }
     ^
197. 
198. AVBufferPool *av_buffer_pool_init2(int size, void *opaque,
