libavformat/utils.c:462: error: Null Dereference
  pointer `&tmp->side_data` last assigned on line 461 could be null and is dereferenced by call to `av_packet_ref()` at line 462, column 19.

libavformat/utils.c:416:1: start of procedure ff_read_packet()
414. }
415. 
416. int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
     ^
417. {
418.     int ret, i, err;

libavformat/utils.c:506:5: Loop condition is true. Entering loop body
504.         if ((err = probe_codec(s, st, pkt)) < 0)
505.             return err;
506.     }
         ^
507. }
508. 

libavformat/utils.c:422:9: 
420. 
421.     for (;;) {
422.         AVPacketList *pktl = s->internal->raw_packet_buffer;
             ^
423. 
424.         if (pktl) {

libavformat/utils.c:424:13: Taking false branch
422.         AVPacketList *pktl = s->internal->raw_packet_buffer;
423. 
424.         if (pktl) {
                 ^
425.             *pkt = pktl->pkt;
426.             st   = s->streams[pkt->stream_index];

libavformat/utils.c:444:9: 
442.         }
443. 
444.         pkt->data = NULL;
             ^
445.         pkt->size = 0;
446.         av_init_packet(pkt);

libavformat/utils.c:445:9: 
443. 
444.         pkt->data = NULL;
445.         pkt->size = 0;
             ^
446.         av_init_packet(pkt);
447.         ret = s->iformat->read_packet(s, pkt);

libavformat/utils.c:446:9: 
444.         pkt->data = NULL;
445.         pkt->size = 0;
446.         av_init_packet(pkt);
             ^
447.         ret = s->iformat->read_packet(s, pkt);
448.         if (ret < 0) {

libavcodec/avpacket.c:31:1: start of procedure av_init_packet()
  29. #include "avcodec.h"
  30. 
  31. void av_init_packet(AVPacket *pkt)
      ^
  32. {
  33.     pkt->pts                  = AV_NOPTS_VALUE;

libavcodec/avpacket.c:33:5: 
  31. void av_init_packet(AVPacket *pkt)
  32. {
  33.     pkt->pts                  = AV_NOPTS_VALUE;
          ^
  34.     pkt->dts                  = AV_NOPTS_VALUE;
  35.     pkt->pos                  = -1;

libavcodec/avpacket.c:34:5: 
  32. {
  33.     pkt->pts                  = AV_NOPTS_VALUE;
  34.     pkt->dts                  = AV_NOPTS_VALUE;
          ^
  35.     pkt->pos                  = -1;
  36.     pkt->duration             = 0;

libavcodec/avpacket.c:35:5: 
  33.     pkt->pts                  = AV_NOPTS_VALUE;
  34.     pkt->dts                  = AV_NOPTS_VALUE;
  35.     pkt->pos                  = -1;
          ^
  36.     pkt->duration             = 0;
  37. #if FF_API_CONVERGENCE_DURATION

libavcodec/avpacket.c:36:5: 
  34.     pkt->dts                  = AV_NOPTS_VALUE;
  35.     pkt->pos                  = -1;
  36.     pkt->duration             = 0;
          ^
  37. #if FF_API_CONVERGENCE_DURATION
  38. FF_DISABLE_DEPRECATION_WARNINGS

libavcodec/avpacket.c:39:5: 
  37. #if FF_API_CONVERGENCE_DURATION
  38. FF_DISABLE_DEPRECATION_WARNINGS
  39.     pkt->convergence_duration = 0;
          ^
  40. FF_ENABLE_DEPRECATION_WARNINGS
  41. #endif

libavcodec/avpacket.c:42:5: 
  40. FF_ENABLE_DEPRECATION_WARNINGS
  41. #endif
  42.     pkt->flags                = 0;
          ^
  43.     pkt->stream_index         = 0;
  44.     pkt->buf                  = NULL;

libavcodec/avpacket.c:43:5: 
  41. #endif
  42.     pkt->flags                = 0;
  43.     pkt->stream_index         = 0;
          ^
  44.     pkt->buf                  = NULL;
  45.     pkt->side_data            = NULL;

libavcodec/avpacket.c:44:5: 
  42.     pkt->flags                = 0;
  43.     pkt->stream_index         = 0;
  44.     pkt->buf                  = NULL;
          ^
  45.     pkt->side_data            = NULL;
  46.     pkt->side_data_elems      = 0;

libavcodec/avpacket.c:45:5: 
  43.     pkt->stream_index         = 0;
  44.     pkt->buf                  = NULL;
  45.     pkt->side_data            = NULL;
          ^
  46.     pkt->side_data_elems      = 0;
  47. }

libavcodec/avpacket.c:46:5: 
  44.     pkt->buf                  = NULL;
  45.     pkt->side_data            = NULL;
  46.     pkt->side_data_elems      = 0;
          ^
  47. }
  48. 

libavcodec/avpacket.c:47:1: return from a call to av_init_packet
  45.     pkt->side_data            = NULL;
  46.     pkt->side_data_elems      = 0;
  47. }
      ^
  48. 
  49. AVPacket *av_packet_alloc(void)

libavformat/utils.c:447:9: Skipping __function_pointer__(): unresolved function pointer
445.         pkt->size = 0;
446.         av_init_packet(pkt);
447.         ret = s->iformat->read_packet(s, pkt);
             ^
448.         if (ret < 0) {
449.             if (!pktl || ret == AVERROR(EAGAIN))

libavformat/utils.c:448:13: Taking false branch
446.         av_init_packet(pkt);
447.         ret = s->iformat->read_packet(s, pkt);
448.         if (ret < 0) {
                 ^
449.             if (!pktl || ret == AVERROR(EAGAIN))
450.                 return ret;

libavformat/utils.c:460:14: Taking true branch
458.         }
459. 
460.         if (!pkt->buf) {
                  ^
461.             AVPacket tmp = { 0 };
462.             ret = av_packet_ref(&tmp, pkt);

libavformat/utils.c:461:13: 
459. 
460.         if (!pkt->buf) {
461.             AVPacket tmp = { 0 };
                 ^
462.             ret = av_packet_ref(&tmp, pkt);
463.             if (ret < 0)

libavformat/utils.c:462:13: 
460.         if (!pkt->buf) {
461.             AVPacket tmp = { 0 };
462.             ret = av_packet_ref(&tmp, pkt);
                 ^
463.             if (ret < 0)
464.                 return ret;

libavcodec/avpacket.c:355:1: start of procedure av_packet_ref()
  353. }
  354. 
  355. int av_packet_ref(AVPacket *dst, const AVPacket *src)
       ^
  356. {
  357.     int ret;

libavcodec/avpacket.c:359:5: 
  357.     int ret;
  358. 
  359.     ret = av_packet_copy_props(dst, src);
           ^
  360.     if (ret < 0)
  361.         return ret;

libavcodec/avpacket.c:314:1: start of procedure av_packet_copy_props()
    312. }
    313. 
    314. int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
         ^
    315. {
    316.     int i;

libavcodec/avpacket.c:318:5: 
    316.     int i;
    317. 
    318.     dst->pts                  = src->pts;
             ^
    319.     dst->dts                  = src->dts;
    320.     dst->pos                  = src->pos;

libavcodec/avpacket.c:319:5: 
    317. 
    318.     dst->pts                  = src->pts;
    319.     dst->dts                  = src->dts;
             ^
    320.     dst->pos                  = src->pos;
    321.     dst->duration             = src->duration;

libavcodec/avpacket.c:320:5: 
    318.     dst->pts                  = src->pts;
    319.     dst->dts                  = src->dts;
    320.     dst->pos                  = src->pos;
             ^
    321.     dst->duration             = src->duration;
    322. #if FF_API_CONVERGENCE_DURATION

libavcodec/avpacket.c:321:5: 
    319.     dst->dts                  = src->dts;
    320.     dst->pos                  = src->pos;
    321.     dst->duration             = src->duration;
             ^
    322. #if FF_API_CONVERGENCE_DURATION
    323. FF_DISABLE_DEPRECATION_WARNINGS

libavcodec/avpacket.c:324:5: 
    322. #if FF_API_CONVERGENCE_DURATION
    323. FF_DISABLE_DEPRECATION_WARNINGS
    324.     dst->convergence_duration = src->convergence_duration;
             ^
    325. FF_ENABLE_DEPRECATION_WARNINGS
    326. #endif

libavcodec/avpacket.c:327:5: 
    325. FF_ENABLE_DEPRECATION_WARNINGS
    326. #endif
    327.     dst->flags                = src->flags;
             ^
    328.     dst->stream_index         = src->stream_index;
    329. 

libavcodec/avpacket.c:328:5: 
    326. #endif
    327.     dst->flags                = src->flags;
    328.     dst->stream_index         = src->stream_index;
             ^
    329. 
    330.     for (i = 0; i < src->side_data_elems; i++) {

libavcodec/avpacket.c:330:10: 
    328.     dst->stream_index         = src->stream_index;
    329. 
    330.     for (i = 0; i < src->side_data_elems; i++) {
                  ^
    331.          enum AVPacketSideDataType type = src->side_data[i].type;
    332.          int size          = src->side_data[i].size;

libavcodec/avpacket.c:330:17: Loop condition is false. Leaving loop
    328.     dst->stream_index         = src->stream_index;
    329. 
    330.     for (i = 0; i < src->side_data_elems; i++) {
                         ^
    331.          enum AVPacketSideDataType type = src->side_data[i].type;
    332.          int size          = src->side_data[i].size;

libavcodec/avpacket.c:343:5: 
    341.     }
    342. 
    343.     return 0;
             ^
    344. }
    345. 

libavcodec/avpacket.c:344:1: return from a call to av_packet_copy_props
    342. 
    343.     return 0;
    344. }
         ^
    345. 
    346. void av_packet_unref(AVPacket *pkt)

libavcodec/avpacket.c:360:9: Taking false branch
  358. 
  359.     ret = av_packet_copy_props(dst, src);
  360.     if (ret < 0)
               ^
  361.         return ret;
  362. 

libavcodec/avpacket.c:363:10: Taking true branch
  361.         return ret;
  362. 
  363.     if (!src->buf) {
                ^
  364.         ret = packet_alloc(&dst->buf, src->size);
  365.         if (ret < 0)

libavcodec/avpacket.c:364:9: 
  362. 
  363.     if (!src->buf) {
  364.         ret = packet_alloc(&dst->buf, src->size);
               ^
  365.         if (ret < 0)
  366.             goto fail;

libavcodec/avpacket.c:69:1: start of procedure packet_alloc()
    67. }
    68. 
    69. static int packet_alloc(AVBufferRef **buf, int size)
        ^
    70. {
    71.     int ret;

libavcodec/avpacket.c:72:9: Taking false branch
    70. {
    71.     int ret;
    72.     if (size < 0 || size >= INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE)
                ^
    73.         return AVERROR(EINVAL);
    74. 

libavcodec/avpacket.c:72:21: Taking false branch
    70. {
    71.     int ret;
    72.     if (size < 0 || size >= INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE)
                            ^
    73.         return AVERROR(EINVAL);
    74. 

libavcodec/avpacket.c:75:5: 
    73.         return AVERROR(EINVAL);
    74. 
    75.     ret = av_buffer_realloc(buf, size + AV_INPUT_BUFFER_PADDING_SIZE);
            ^
    76.     if (ret < 0)
    77.         return ret;

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 false 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:170:16: Taking false branch
      168. 
      169.         return 0;
      170.     } else if (buf->size == size)
                          ^
      171.         return 0;
      172. 

libavutil/buffer.c:173:11: Taking false branch
      171.         return 0;
      172. 
      173.     if (!(buf->buffer->flags & BUFFER_FLAG_REALLOCATABLE) ||
                     ^
      174.         !av_buffer_is_writable(buf) || buf->data != buf->buffer->data) {
      175.         /* cannot realloc, allocate a new reallocable buffer and copy data */

libavutil/buffer.c:174:10: 
      172. 
      173.     if (!(buf->buffer->flags & BUFFER_FLAG_REALLOCATABLE) ||
      174.         !av_buffer_is_writable(buf) || buf->data != buf->buffer->data) {
                    ^
      175.         /* cannot realloc, allocate a new reallocable buffer and copy data */
      176.         AVBufferRef *new = NULL;

libavutil/buffer.c:122:1: start of procedure av_buffer_is_writable()
        120. }
        121. 
        122. int av_buffer_is_writable(const AVBufferRef *buf)
             ^
        123. {
        124.     if (buf->buffer->flags & AV_BUFFER_FLAG_READONLY)

libavutil/buffer.c:124:9: Taking false branch
        122. int av_buffer_is_writable(const AVBufferRef *buf)
        123. {
        124.     if (buf->buffer->flags & AV_BUFFER_FLAG_READONLY)
                     ^
        125.         return 0;
        126. 

libavutil/buffer.c:127:12: Condition is true
        125.         return 0;
        126. 
        127.     return atomic_load(&buf->buffer->refcount) == 1;
                        ^
        128. }
        129. 

libavutil/buffer.c:127:5: 
        125.         return 0;
        126. 
        127.     return atomic_load(&buf->buffer->refcount) == 1;
                 ^
        128. }
        129. 

libavutil/buffer.c:128:1: return from a call to av_buffer_is_writable
        126. 
        127.     return atomic_load(&buf->buffer->refcount) == 1;
        128. }
             ^
        129. 
        130. int av_buffer_make_writable(AVBufferRef **pbuf)

libavutil/buffer.c:174:10: Taking false branch
      172. 
      173.     if (!(buf->buffer->flags & BUFFER_FLAG_REALLOCATABLE) ||
      174.         !av_buffer_is_writable(buf) || buf->data != buf->buffer->data) {
                    ^
      175.         /* cannot realloc, allocate a new reallocable buffer and copy data */
      176.         AVBufferRef *new = NULL;

libavutil/buffer.c:174:40: Taking false branch
      172. 
      173.     if (!(buf->buffer->flags & BUFFER_FLAG_REALLOCATABLE) ||
      174.         !av_buffer_is_writable(buf) || buf->data != buf->buffer->data) {
                                                  ^
      175.         /* cannot realloc, allocate a new reallocable buffer and copy data */
      176.         AVBufferRef *new = NULL;

libavutil/buffer.c:189:5: 
      187.     }
      188. 
      189.     tmp = av_realloc(buf->buffer->data, size);
               ^
      190.     if (!tmp)
      191.         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:190:10: Taking false branch
      188. 
      189.     tmp = av_realloc(buf->buffer->data, size);
      190.     if (!tmp)
                    ^
      191.         return AVERROR(ENOMEM);
      192. 

libavutil/buffer.c:193:5: 
      191.         return AVERROR(ENOMEM);
      192. 
      193.     buf->buffer->data = buf->data = tmp;
               ^
      194.     buf->buffer->size = buf->size = size;
      195.     return 0;

libavutil/buffer.c:194:5: 
      192. 
      193.     buf->buffer->data = buf->data = tmp;
      194.     buf->buffer->size = buf->size = size;
               ^
      195.     return 0;
      196. }

libavutil/buffer.c:195:5: 
      193.     buf->buffer->data = buf->data = tmp;
      194.     buf->buffer->size = buf->size = size;
      195.     return 0;
               ^
      196. }
      197. 

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,

libavcodec/avpacket.c:76:9: Taking false branch
    74. 
    75.     ret = av_buffer_realloc(buf, size + AV_INPUT_BUFFER_PADDING_SIZE);
    76.     if (ret < 0)
                ^
    77.         return ret;
    78. 

libavcodec/avpacket.c:79:5: 
    77.         return ret;
    78. 
    79.     memset((*buf)->data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
            ^
    80. 
    81.     return 0;

libavcodec/avpacket.c:81:5: 
    79.     memset((*buf)->data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
    80. 
    81.     return 0;
            ^
    82. }
    83. 

libavcodec/avpacket.c:82:1: return from a call to packet_alloc
    80. 
    81.     return 0;
    82. }
        ^
    83. 
    84. int av_new_packet(AVPacket *pkt, int size)

libavcodec/avpacket.c:365:13: Taking false branch
  363.     if (!src->buf) {
  364.         ret = packet_alloc(&dst->buf, src->size);
  365.         if (ret < 0)
                   ^
  366.             goto fail;
  367.         memcpy(dst->buf->data, src->data, src->size);

libavcodec/avpacket.c:367:9: 
  365.         if (ret < 0)
  366.             goto fail;
  367.         memcpy(dst->buf->data, src->data, src->size);
               ^
  368. 
  369.         dst->data = dst->buf->data;

libavcodec/avpacket.c:369:9: 
  367.         memcpy(dst->buf->data, src->data, src->size);
  368. 
  369.         dst->data = dst->buf->data;
               ^
  370.     } else {
  371.         dst->buf = av_buffer_ref(src->buf);

libavcodec/avpacket.c:379:5: 
  377.     }
  378. 
  379.     dst->size = src->size;
           ^
  380. 
  381.     return 0;

libavcodec/avpacket.c:381:5: 
  379.     dst->size = src->size;
  380. 
  381.     return 0;
           ^
  382. fail:
  383.     av_packet_free_side_data(dst);

libavcodec/avpacket.c:385:1: return from a call to av_packet_ref
  383.     av_packet_free_side_data(dst);
  384.     return ret;
  385. }
       ^
  386. 
  387. AVPacket *av_packet_clone(const AVPacket *src)
