libavformat/utils.c:360: error: Memory Leak
  memory dynamically allocated by call to `av_reallocp()` at line 343, column 24 is not reachable after line 360, column 13.

libavformat/utils.c:334:1: start of procedure probe_codec()
332. /*******************************************************/
333. 
334. static int probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt)
     ^
335. {
336.     if (st->codec->codec_id == AV_CODEC_ID_PROBE) {

libavformat/utils.c:336:9: Taking true branch
334. static int probe_codec(AVFormatContext *s, AVStream *st, const AVPacket *pkt)
335. {
336.     if (st->codec->codec_id == AV_CODEC_ID_PROBE) {
             ^
337.         AVProbeData *pd = &st->probe_data;
338.         av_log(s, AV_LOG_DEBUG, "probing stream %d\n", st->index);

libavformat/utils.c:337:9: 
335. {
336.     if (st->codec->codec_id == AV_CODEC_ID_PROBE) {
337.         AVProbeData *pd = &st->probe_data;
             ^
338.         av_log(s, AV_LOG_DEBUG, "probing stream %d\n", st->index);
339.         --st->probe_packets;

libavformat/utils.c:338:9: Skipping av_log(): empty list of specs
336.     if (st->codec->codec_id == AV_CODEC_ID_PROBE) {
337.         AVProbeData *pd = &st->probe_data;
338.         av_log(s, AV_LOG_DEBUG, "probing stream %d\n", st->index);
             ^
339.         --st->probe_packets;
340. 

libavformat/utils.c:339:9: 
337.         AVProbeData *pd = &st->probe_data;
338.         av_log(s, AV_LOG_DEBUG, "probing stream %d\n", st->index);
339.         --st->probe_packets;
             ^
340. 
341.         if (pkt) {

libavformat/utils.c:341:13: Taking true branch
339.         --st->probe_packets;
340. 
341.         if (pkt) {
                 ^
342.             int err;
343.             if ((err = av_reallocp(&pd->buf, pd->buf_size + pkt->size +

libavformat/utils.c:343:17: 
341.         if (pkt) {
342.             int err;
343.             if ((err = av_reallocp(&pd->buf, pd->buf_size + pkt->size +
                     ^
344.                                    AVPROBE_PADDING_SIZE)) < 0)
345.                 return err;

libavutil/mem.c:140:1: start of procedure av_reallocp()
  138. }
  139. 
  140. int av_reallocp(void *ptr, size_t size)
       ^
  141. {
  142.     void **ptrptr = ptr;

libavutil/mem.c:142:5: 
  140. int av_reallocp(void *ptr, size_t size)
  141. {
  142.     void **ptrptr = ptr;
           ^
  143.     void *ret;
  144. 

libavutil/mem.c:145:10: Taking false branch
  143.     void *ret;
  144. 
  145.     if (!size) {
                ^
  146.         av_freep(ptr);
  147.         return 0;

libavutil/mem.c:149:5: 
  147.         return 0;
  148.     }
  149.     ret = av_realloc(*ptrptr, size);
           ^
  150. 
  151.     if (!ret) {

libavutil/mem.c:117:1: start of procedure av_realloc()
    115. }
    116. 
    117. void *av_realloc(void *ptr, size_t size)
         ^
    118. {
    119. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:124:9: Taking false branch
    122. 
    123.     /* let's disallow possibly ambiguous cases */
    124.     if (size > (INT_MAX - 16))
                 ^
    125.         return NULL;
    126. 

libavutil/mem.c:136:5: 
    134.     return _aligned_realloc(ptr, size, 32);
    135. #else
    136.     return realloc(ptr, size);
             ^
    137. #endif
    138. }

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

libavutil/mem.c:151:10: Taking false branch
  149.     ret = av_realloc(*ptrptr, size);
  150. 
  151.     if (!ret) {
                ^
  152.         av_freep(ptr);
  153.         return AVERROR(ENOMEM);

libavutil/mem.c:156:5: 
  154.     }
  155. 
  156.     *ptrptr = ret;
           ^
  157.     return 0;
  158. }

libavutil/mem.c:157:5: 
  155. 
  156.     *ptrptr = ret;
  157.     return 0;
           ^
  158. }
  159. 

libavutil/mem.c:158:1: return from a call to av_reallocp
  156.     *ptrptr = ret;
  157.     return 0;
  158. }
       ^
  159. 
  160. void *av_realloc_array(void *ptr, size_t nmemb, size_t size)

libavformat/utils.c:343:17: Taking false branch
341.         if (pkt) {
342.             int err;
343.             if ((err = av_reallocp(&pd->buf, pd->buf_size + pkt->size +
                     ^
344.                                    AVPROBE_PADDING_SIZE)) < 0)
345.                 return err;

libavformat/utils.c:346:13: 
344.                                    AVPROBE_PADDING_SIZE)) < 0)
345.                 return err;
346.             memcpy(pd->buf + pd->buf_size, pkt->data, pkt->size);
                 ^
347.             pd->buf_size += pkt->size;
348.             memset(pd->buf + pd->buf_size, 0, AVPROBE_PADDING_SIZE);

libavformat/utils.c:347:13: 
345.                 return err;
346.             memcpy(pd->buf + pd->buf_size, pkt->data, pkt->size);
347.             pd->buf_size += pkt->size;
                 ^
348.             memset(pd->buf + pd->buf_size, 0, AVPROBE_PADDING_SIZE);
349.         } else {

libavformat/utils.c:348:13: 
346.             memcpy(pd->buf + pd->buf_size, pkt->data, pkt->size);
347.             pd->buf_size += pkt->size;
348.             memset(pd->buf + pd->buf_size, 0, AVPROBE_PADDING_SIZE);
                 ^
349.         } else {
350.             st->probe_packets = 0;

libavformat/utils.c:358:14: Taking false branch
356.         }
357. 
358.         if (!st->probe_packets ||
                  ^
359.             av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)) {
360.             set_codec_from_probe_data(s, st, pd, st->probe_packets > 0

libavformat/utils.c:359:13: Taking true branch
357. 
358.         if (!st->probe_packets ||
359.             av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)) {
                 ^
360.             set_codec_from_probe_data(s, st, pd, st->probe_packets > 0
361.                                                  ? AVPROBE_SCORE_MAX / 4 : 0);

libavformat/utils.c:360:50: Condition is false
358.         if (!st->probe_packets ||
359.             av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)) {
360.             set_codec_from_probe_data(s, st, pd, st->probe_packets > 0
                                                      ^
361.                                                  ? AVPROBE_SCORE_MAX / 4 : 0);
362.             if (st->codec->codec_id != AV_CODEC_ID_PROBE) {

libavformat/utils.c:360:13: Skipping set_codec_from_probe_data(): empty list of specs
358.         if (!st->probe_packets ||
359.             av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)) {
360.             set_codec_from_probe_data(s, st, pd, st->probe_packets > 0
                 ^
361.                                                  ? AVPROBE_SCORE_MAX / 4 : 0);
362.             if (st->codec->codec_id != AV_CODEC_ID_PROBE) {
