libavcodec/utils.c:373: error: Null Dereference
  pointer `desc` last assigned on line 372 could be null and is dereferenced at line 373, column 32.

libavcodec/utils.c:331:1: start of procedure video_get_buffer()
329. }
330. 
331. static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
     ^
332. {
333.     int i;

libavcodec/utils.c:334:5: 
332. {
333.     int i;
334.     int w = s->width;
         ^
335.     int h = s->height;
336.     InternalBuffer *buf;

libavcodec/utils.c:335:5: 
333.     int i;
334.     int w = s->width;
335.     int h = s->height;
         ^
336.     InternalBuffer *buf;
337.     AVCodecInternal *avci = s->internal;

libavcodec/utils.c:337:5: 
335.     int h = s->height;
336.     InternalBuffer *buf;
337.     AVCodecInternal *avci = s->internal;
         ^
338. 
339.     if (pic->data[0] != NULL) {

libavcodec/utils.c:339:9: Taking false branch
337.     AVCodecInternal *avci = s->internal;
338. 
339.     if (pic->data[0] != NULL) {
             ^
340.         av_log(s, AV_LOG_ERROR, "pic->data[0]!=NULL in avcodec_default_get_buffer\n");
341.         return -1;

libavcodec/utils.c:343:9: Taking false branch
341.         return -1;
342.     }
343.     if (avci->buffer_count >= INTERNAL_BUFFER_SIZE) {
             ^
344.         av_log(s, AV_LOG_ERROR, "buffer_count overflow (missing release_buffer?)\n");
345.         return -1;

libavcodec/utils.c:348:9: 
346.     }
347. 
348.     if (av_image_check_size(w, h, 0, s))
             ^
349.         return -1;
350. 

libavutil/imgutils.c:220:1: start of procedure av_image_check_size()
  218. static const AVClass imgutils_class = { "IMGUTILS", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT, offsetof(ImgUtils, log_offset), offsetof(ImgUtils, log_ctx) };
  219. 
  220. int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
       ^
  221. {
  222.     ImgUtils imgutils = { &imgutils_class, log_offset, log_ctx };

libavutil/imgutils.c:222:5: 
  220. int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
  221. {
  222.     ImgUtils imgutils = { &imgutils_class, log_offset, log_ctx };
           ^
  223. 
  224.     if ((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)

libavutil/imgutils.c:224:9: Taking true branch
  222.     ImgUtils imgutils = { &imgutils_class, log_offset, log_ctx };
  223. 
  224.     if ((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)
               ^
  225.         return 0;
  226. 

libavutil/imgutils.c:224:21: Taking true branch
  222.     ImgUtils imgutils = { &imgutils_class, log_offset, log_ctx };
  223. 
  224.     if ((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)
                           ^
  225.         return 0;
  226. 

libavutil/imgutils.c:224:33: Taking true branch
  222.     ImgUtils imgutils = { &imgutils_class, log_offset, log_ctx };
  223. 
  224.     if ((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)
                                       ^
  225.         return 0;
  226. 

libavutil/imgutils.c:225:9: 
  223. 
  224.     if ((int)w>0 && (int)h>0 && (w+128)*(uint64_t)(h+128) < INT_MAX/8)
  225.         return 0;
               ^
  226. 
  227.     av_log(&imgutils, AV_LOG_ERROR, "Picture size %ux%u is invalid\n", w, h);

libavutil/imgutils.c:229:1: return from a call to av_image_check_size
  227.     av_log(&imgutils, AV_LOG_ERROR, "Picture size %ux%u is invalid\n", w, h);
  228.     return AVERROR(EINVAL);
  229. }
       ^
  230. 
  231. void av_image_copy_plane(uint8_t       *dst, int dst_linesize,

libavcodec/utils.c:348:9: Taking false branch
346.     }
347. 
348.     if (av_image_check_size(w, h, 0, s))
             ^
349.         return -1;
350. 

libavcodec/utils.c:351:10: Taking false branch
349.         return -1;
350. 
351.     if (!avci->buffer) {
              ^
352.         avci->buffer = av_mallocz((INTERNAL_BUFFER_SIZE + 1) *
353.                                   sizeof(InternalBuffer));

libavcodec/utils.c:356:5: 
354.     }
355. 
356.     buf = &avci->buffer[avci->buffer_count];
         ^
357. 
358.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {

libavcodec/utils.c:358:9: Taking true branch
356.     buf = &avci->buffer[avci->buffer_count];
357. 
358.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {
             ^
359.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
360.             av_freep(&buf->base[i]);

libavcodec/utils.c:358:26: Taking false branch
356.     buf = &avci->buffer[avci->buffer_count];
357. 
358.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {
                              ^
359.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
360.             av_freep(&buf->base[i]);

libavcodec/utils.c:358:45: Taking true branch
356.     buf = &avci->buffer[avci->buffer_count];
357. 
358.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {
                                                 ^
359.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
360.             av_freep(&buf->base[i]);

libavcodec/utils.c:359:14: 
357. 
358.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {
359.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
                  ^
360.             av_freep(&buf->base[i]);
361.             buf->data[i] = NULL;

libavcodec/utils.c:359:21: Loop condition is true. Entering loop body
357. 
358.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {
359.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
                         ^
360.             av_freep(&buf->base[i]);
361.             buf->data[i] = NULL;

libavcodec/utils.c:360:13: 
358.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {
359.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
360.             av_freep(&buf->base[i]);
                 ^
361.             buf->data[i] = NULL;
362.         }

libavutil/mem.c:151:1: start of procedure av_freep()
  149. }
  150. 
  151. void av_freep(void *arg)
       ^
  152. {
  153.     void **ptr = (void **)arg;

libavutil/mem.c:153:5: 
  151. void av_freep(void *arg)
  152. {
  153.     void **ptr = (void **)arg;
           ^
  154.     av_free(*ptr);
  155.     *ptr = NULL;

libavutil/mem.c:154:5: 
  152. {
  153.     void **ptr = (void **)arg;
  154.     av_free(*ptr);
           ^
  155.     *ptr = NULL;
  156. }

libavutil/mem.c:139:1: start of procedure av_free()
    137. }
    138. 
    139. void av_free(void *ptr)
         ^
    140. {
    141. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:147:5: 
    145.     _aligned_free(ptr);
    146. #else
    147.     free(ptr);
             ^
    148. #endif
    149. }

libavutil/mem.c:149:1: return from a call to av_free
    147.     free(ptr);
    148. #endif
    149. }
         ^
    150. 
    151. void av_freep(void *arg)

libavutil/mem.c:155:5: 
  153.     void **ptr = (void **)arg;
  154.     av_free(*ptr);
  155.     *ptr = NULL;
           ^
  156. }
  157. 

libavutil/mem.c:156:1: return from a call to av_freep
  154.     av_free(*ptr);
  155.     *ptr = NULL;
  156. }
       ^
  157. 
  158. void *av_mallocz(size_t size)

libavcodec/utils.c:361:13: 
359.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
360.             av_freep(&buf->base[i]);
361.             buf->data[i] = NULL;
                 ^
362.         }
363.     }

libavcodec/utils.c:359:47: 
357. 
358.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {
359.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
                                                   ^
360.             av_freep(&buf->base[i]);
361.             buf->data[i] = NULL;

libavcodec/utils.c:359:21: Loop condition is false. Leaving loop
357. 
358.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {
359.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
                         ^
360.             av_freep(&buf->base[i]);
361.             buf->data[i] = NULL;

libavcodec/utils.c:365:10: Taking true branch
363.     }
364. 
365.     if (!buf->base[0]) {
              ^
366.         int h_chroma_shift, v_chroma_shift;
367.         int size[4] = { 0 };

libavcodec/utils.c:367:9: 
365.     if (!buf->base[0]) {
366.         int h_chroma_shift, v_chroma_shift;
367.         int size[4] = { 0 };
             ^
368.         int tmpsize;
369.         int unaligned;

libavcodec/utils.c:372:9: 
370.         AVPicture picture;
371.         int stride_align[AV_NUM_DATA_POINTERS];
372.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->pix_fmt);
             ^
373.         const int pixel_size = desc->comp[0].step_minus1 + 1;
374. 

libavutil/pixdesc.c:1434:1: start of procedure av_pix_fmt_desc_get()
  1432. }
  1433. 
  1434. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1436:9: Taking false branch
  1434. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1437.         return NULL;
  1438.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1436:24: Taking true branch
  1434. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1437.         return NULL;
  1438.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1437:9: 
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1437.         return NULL;
                ^
  1438.     return &av_pix_fmt_descriptors[pix_fmt];
  1439. }

libavutil/pixdesc.c:1439:1: return from a call to av_pix_fmt_desc_get
  1437.         return NULL;
  1438.     return &av_pix_fmt_descriptors[pix_fmt];
  1439. }
        ^
  1440. 
  1441. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavcodec/utils.c:373:9: 
371.         int stride_align[AV_NUM_DATA_POINTERS];
372.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->pix_fmt);
373.         const int pixel_size = desc->comp[0].step_minus1 + 1;
             ^
374. 
375.         av_pix_fmt_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift,
