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

libavcodec/utils.c:387:1: start of procedure video_get_buffer()
385. }
386. 
387. static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
     ^
388. {
389.     int i;

libavcodec/utils.c:390:5: 
388. {
389.     int i;
390.     int w = s->width;
         ^
391.     int h = s->height;
392.     InternalBuffer *buf;

libavcodec/utils.c:391:5: 
389.     int i;
390.     int w = s->width;
391.     int h = s->height;
         ^
392.     InternalBuffer *buf;
393.     AVCodecInternal *avci = s->internal;

libavcodec/utils.c:393:5: 
391.     int h = s->height;
392.     InternalBuffer *buf;
393.     AVCodecInternal *avci = s->internal;
         ^
394. 
395.     if (pic->data[0] != NULL) {

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

libavcodec/utils.c:399:9: Taking false branch
397.         return -1;
398.     }
399.     if (avci->buffer_count >= INTERNAL_BUFFER_SIZE) {
             ^
400.         av_log(s, AV_LOG_ERROR, "buffer_count overflow (missing release_buffer?)\n");
401.         return -1;

libavcodec/utils.c:404:9: 
402.     }
403. 
404.     if (av_image_check_size(w, h, 0, s))
             ^
405.         return -1;
406. 

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:404:9: Taking false branch
402.     }
403. 
404.     if (av_image_check_size(w, h, 0, s))
             ^
405.         return -1;
406. 

libavcodec/utils.c:407:10: Taking false branch
405.         return -1;
406. 
407.     if (!avci->buffer) {
              ^
408.         avci->buffer = av_mallocz((INTERNAL_BUFFER_SIZE + 1) *
409.                                   sizeof(InternalBuffer));

libavcodec/utils.c:412:5: 
410.     }
411. 
412.     buf = &avci->buffer[avci->buffer_count];
         ^
413. 
414.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {

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

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

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

libavcodec/utils.c:415:14: 
413. 
414.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {
415.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
                  ^
416.             av_freep(&buf->base[i]);
417.             buf->data[i] = NULL;

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

libavcodec/utils.c:416:13: 
414.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {
415.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
416.             av_freep(&buf->base[i]);
                 ^
417.             buf->data[i] = NULL;
418.         }

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

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

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

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

libavutil/mem.c:150:5: 
    148.     _aligned_free(ptr);
    149. #else
    150.     free(ptr);
             ^
    151. #endif
    152. }

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

libavutil/mem.c:158:5: 
  156.     void **ptr = (void **)arg;
  157.     av_free(*ptr);
  158.     *ptr = NULL;
           ^
  159. }
  160. 

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

libavcodec/utils.c:417:13: 
415.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
416.             av_freep(&buf->base[i]);
417.             buf->data[i] = NULL;
                 ^
418.         }
419.     }

libavcodec/utils.c:415:47: 
413. 
414.     if (buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)) {
415.         for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
                                                   ^
416.             av_freep(&buf->base[i]);
417.             buf->data[i] = NULL;

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

libavcodec/utils.c:421:10: Taking true branch
419.     }
420. 
421.     if (!buf->base[0]) {
              ^
422.         int h_chroma_shift, v_chroma_shift;
423.         int size[4] = { 0 };

libavcodec/utils.c:423:9: 
421.     if (!buf->base[0]) {
422.         int h_chroma_shift, v_chroma_shift;
423.         int size[4] = { 0 };
             ^
424.         int tmpsize;
425.         int unaligned;

libavcodec/utils.c:428:9: 
426.         AVPicture picture;
427.         int stride_align[AV_NUM_DATA_POINTERS];
428.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->pix_fmt);
             ^
429.         const int pixel_size = desc->comp[0].step_minus1 + 1;
430. 

libavutil/pixdesc.c:1199:1: start of procedure av_pix_fmt_desc_get()
  1197. }
  1198. 
  1199. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1201:9: Taking false branch
  1199. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1202.         return NULL;
  1203.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1201:24: Taking true branch
  1199. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1202.         return NULL;
  1203.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1202:9: 
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1202.         return NULL;
                ^
  1203.     return &av_pix_fmt_descriptors[pix_fmt];
  1204. }

libavutil/pixdesc.c:1204:1: return from a call to av_pix_fmt_desc_get
  1202.         return NULL;
  1203.     return &av_pix_fmt_descriptors[pix_fmt];
  1204. }
        ^
  1205. 
  1206. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavcodec/utils.c:429:9: 
427.         int stride_align[AV_NUM_DATA_POINTERS];
428.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->pix_fmt);
429.         const int pixel_size = desc->comp[0].step_minus1 + 1;
             ^
430. 
431.         avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift);
