libavfilter/vf_scale.c:273: error: Null Dereference
  pointer `desc` last assigned on line 268 could be null and is dereferenced at line 273, column 19.

libavfilter/vf_scale.c:263:1: start of procedure filter_frame()
261. }
262. 
263. static int filter_frame(AVFilterLink *link, AVFrame *in)
     ^
264. {
265.     ScaleContext *scale = link->dst->priv;

libavfilter/vf_scale.c:265:5: 
263. static int filter_frame(AVFilterLink *link, AVFrame *in)
264. {
265.     ScaleContext *scale = link->dst->priv;
         ^
266.     AVFilterLink *outlink = link->dst->outputs[0];
267.     AVFrame *out;

libavfilter/vf_scale.c:266:5: 
264. {
265.     ScaleContext *scale = link->dst->priv;
266.     AVFilterLink *outlink = link->dst->outputs[0];
         ^
267.     AVFrame *out;
268.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(link->format);

libavfilter/vf_scale.c:268:5: 
266.     AVFilterLink *outlink = link->dst->outputs[0];
267.     AVFrame *out;
268.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(link->format);
         ^
269. 
270.     if (!scale->sws)

libavutil/pixdesc.c:1626:1: start of procedure av_pix_fmt_desc_get()
  1624. }
  1625. 
  1626. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1627. {
  1628.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1628:9: Taking false branch
  1626. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1627. {
  1628.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1629.         return NULL;
  1630.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1628:24: Taking true branch
  1626. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1627. {
  1628.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1629.         return NULL;
  1630.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1629:9: 
  1627. {
  1628.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1629.         return NULL;
                ^
  1630.     return &av_pix_fmt_descriptors[pix_fmt];
  1631. }

libavutil/pixdesc.c:1631:1: return from a call to av_pix_fmt_desc_get
  1629.         return NULL;
  1630.     return &av_pix_fmt_descriptors[pix_fmt];
  1631. }
        ^
  1632. 
  1633. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavfilter/vf_scale.c:270:10: Taking false branch
268.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(link->format);
269. 
270.     if (!scale->sws)
              ^
271.         return ff_filter_frame(outlink, in);
272. 

libavfilter/vf_scale.c:273:5: 
271.         return ff_filter_frame(outlink, in);
272. 
273.     scale->hsub = desc->log2_chroma_w;
         ^
274.     scale->vsub = desc->log2_chroma_h;
275. 

static int filter_frame(AVFilterLink *link, AVFrame *in)
{
    ScaleContext *scale = link->dst->priv;
    AVFilterLink *outlink = link->dst->outputs[0];
    AVFrame *out;
    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(link->format);
    if (!scale->sws)
        return ff_filter_frame(outlink, in);
    scale->hsub = desc->log2_chroma_w;
    scale->vsub = desc->log2_chroma_h;
    out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
    if (!out) {
        av_frame_free(&in);
        return AVERROR(ENOMEM);
    }
    av_frame_copy_props(out, in);
    out->width  = outlink->w;
    out->height = outlink->h;
    av_reduce(&out->sample_aspect_ratio.num, &out->sample_aspect_ratio.den,
              (int64_t)in->sample_aspect_ratio.num * outlink->h * link->w,
              (int64_t)in->sample_aspect_ratio.den * outlink->w * link->h,
              INT_MAX);
    sws_scale(scale->sws, in->data, in->linesize, 0, in->height,
              out->data, out->linesize);
    av_frame_free(&in);
    return ff_filter_frame(outlink, out);
}
['static int filter_frame(AVFilterLink *link, AVFrame *in)\n{\n    ScaleContext *scale = link->dst->priv;\n    AVFilterLink *outlink = link->dst->outputs[0];\n    AVFrame *out;\n    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(link->format);\n    if (!scale->sws)\n        return ff_filter_frame(outlink, in);\n    scale->hsub = desc->log2_chroma_w;\n    scale->vsub = desc->log2_chroma_h;\n    out = ff_get_video_buffer(outlink, outlink->w, outlink->h);\n    if (!out) {\n        av_frame_free(&in);\n        return AVERROR(ENOMEM);\n    }\n    av_frame_copy_props(out, in);\n    out->width  = outlink->w;\n    out->height = outlink->h;\n    av_reduce(&out->sample_aspect_ratio.num, &out->sample_aspect_ratio.den,\n              (int64_t)in->sample_aspect_ratio.num * outlink->h * link->w,\n              (int64_t)in->sample_aspect_ratio.den * outlink->w * link->h,\n              INT_MAX);\n    sws_scale(scale->sws, in->data, in->linesize, 0, in->height,\n              out->data, out->linesize);\n    av_frame_free(&in);\n    return ff_filter_frame(outlink, out);\n}', 'const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)\n{\n    if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)\n        return NULL;\n    return &av_pix_fmt_descriptors[pix_fmt];\n}']