avconv.c:1588: error: Null Dereference
  pointer `desc` last assigned on line 1585 could be null and is dereferenced at line 1588, column 15.

avconv.c:1578:1: start of procedure get_format()
1576. }
1577. 
1578. static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat *pix_fmts)
      ^
1579. {
1580.     InputStream *ist = s->opaque;

avconv.c:1580:5: 
1578. static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat *pix_fmts)
1579. {
1580.     InputStream *ist = s->opaque;
          ^
1581.     const enum AVPixelFormat *p;
1582.     int ret;

avconv.c:1584:10: 
1582.     int ret;
1583. 
1584.     for (p = pix_fmts; *p != -1; p++) {
               ^
1585.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(*p);
1586.         const HWAccel *hwaccel;

avconv.c:1584:24: Loop condition is true. Entering loop body
1582.     int ret;
1583. 
1584.     for (p = pix_fmts; *p != -1; p++) {
                             ^
1585.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(*p);
1586.         const HWAccel *hwaccel;

avconv.c:1585:9: 
1583. 
1584.     for (p = pix_fmts; *p != -1; p++) {
1585.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(*p);
              ^
1586.         const HWAccel *hwaccel;
1587. 

libavutil/pixdesc.c:1744:1: start of procedure av_pix_fmt_desc_get()
  1742. }
  1743. 
  1744. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1745. {
  1746.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1746:9: Taking false branch
  1744. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1745. {
  1746.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1747.         return NULL;
  1748.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1746:24: Taking true branch
  1744. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1745. {
  1746.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1747.         return NULL;
  1748.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1747:9: 
  1745. {
  1746.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1747.         return NULL;
                ^
  1748.     return &av_pix_fmt_descriptors[pix_fmt];
  1749. }

libavutil/pixdesc.c:1749:1: return from a call to av_pix_fmt_desc_get
  1747.         return NULL;
  1748.     return &av_pix_fmt_descriptors[pix_fmt];
  1749. }
        ^
  1750. 
  1751. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

avconv.c:1588:15: 
1586.         const HWAccel *hwaccel;
1587. 
1588.         if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL))
                    ^
1589.             break;
1590. 

static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat *pix_fmts)
{
    InputStream *ist = s->opaque;
    const enum AVPixelFormat *p;
    int ret;
    for (p = pix_fmts; *p != -1; p++) {
        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(*p);
        const HWAccel *hwaccel;
        if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL))
            break;
        hwaccel = get_hwaccel(*p);
        if (!hwaccel ||
            (ist->active_hwaccel_id && ist->active_hwaccel_id != hwaccel->id) ||
            (ist->hwaccel_id != HWACCEL_AUTO && ist->hwaccel_id != hwaccel->id))
            continue;
        ret = hwaccel->init(s);
        if (ret < 0) {
            if (ist->hwaccel_id == hwaccel->id) {
                av_log(NULL, AV_LOG_FATAL,
                       "%s hwaccel requested for input stream #%d:%d, "
                       "but cannot be initialized.\n", hwaccel->name,
                       ist->file_index, ist->st->index);
                return AV_PIX_FMT_NONE;
            }
            continue;
        }
        if (ist->hw_frames_ctx) {
            s->hw_frames_ctx = av_buffer_ref(ist->hw_frames_ctx);
            if (!s->hw_frames_ctx)
                return AV_PIX_FMT_NONE;
        }
        ist->active_hwaccel_id = hwaccel->id;
        ist->hwaccel_pix_fmt   = *p;
        break;
    }
    return *p;
}
['static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat *pix_fmts)\n{\n    InputStream *ist = s->opaque;\n    const enum AVPixelFormat *p;\n    int ret;\n    for (p = pix_fmts; *p != -1; p++) {\n        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(*p);\n        const HWAccel *hwaccel;\n        if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL))\n            break;\n        hwaccel = get_hwaccel(*p);\n        if (!hwaccel ||\n            (ist->active_hwaccel_id && ist->active_hwaccel_id != hwaccel->id) ||\n            (ist->hwaccel_id != HWACCEL_AUTO && ist->hwaccel_id != hwaccel->id))\n            continue;\n        ret = hwaccel->init(s);\n        if (ret < 0) {\n            if (ist->hwaccel_id == hwaccel->id) {\n                av_log(NULL, AV_LOG_FATAL,\n                       "%s hwaccel requested for input stream #%d:%d, "\n                       "but cannot be initialized.\\n", hwaccel->name,\n                       ist->file_index, ist->st->index);\n                return AV_PIX_FMT_NONE;\n            }\n            continue;\n        }\n        if (ist->hw_frames_ctx) {\n            s->hw_frames_ctx = av_buffer_ref(ist->hw_frames_ctx);\n            if (!s->hw_frames_ctx)\n                return AV_PIX_FMT_NONE;\n        }\n        ist->active_hwaccel_id = hwaccel->id;\n        ist->hwaccel_pix_fmt   = *p;\n        break;\n    }\n    return *p;\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}']