libavcodec/vp9block.c:1319: error: Null Dereference
  pointer `ref2` last assigned on line 1228 could be null and is dereferenced at line 1319, column 25.

libavcodec/vp9block.c:1218:1: start of procedure inter_recon()
1216. }
1217. 
1218. static int inter_recon(AVCodecContext *avctx)
      ^
1219. {
1220.     static const uint8_t bwlog_tab[2][N_BS_SIZES] = {

libavcodec/vp9block.c:1220:5: 
1218. static int inter_recon(AVCodecContext *avctx)
1219. {
1220.     static const uint8_t bwlog_tab[2][N_BS_SIZES] = {
          ^
1221.         { 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 },
1222.         { 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4 },

libavcodec/vp9block.c:1224:5: 
1222.         { 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4 },
1223.     };
1224.     VP9Context *s = avctx->priv_data;
          ^
1225.     VP9Block *const b = &s->b;
1226.     int row = b->row, col = b->col;

libavcodec/vp9block.c:1225:5: 
1223.     };
1224.     VP9Context *s = avctx->priv_data;
1225.     VP9Block *const b = &s->b;
          ^
1226.     int row = b->row, col = b->col;
1227.     AVFrame *ref1 = s->refs[s->refidx[b->ref[0]]];

libavcodec/vp9block.c:1226:5: 
1224.     VP9Context *s = avctx->priv_data;
1225.     VP9Block *const b = &s->b;
1226.     int row = b->row, col = b->col;
          ^
1227.     AVFrame *ref1 = s->refs[s->refidx[b->ref[0]]];
1228.     AVFrame *ref2 = b->comp ? s->refs[s->refidx[b->ref[1]]] : NULL;

libavcodec/vp9block.c:1227:5: 
1225.     VP9Block *const b = &s->b;
1226.     int row = b->row, col = b->col;
1227.     AVFrame *ref1 = s->refs[s->refidx[b->ref[0]]];
          ^
1228.     AVFrame *ref2 = b->comp ? s->refs[s->refidx[b->ref[1]]] : NULL;
1229.     int w = avctx->width, h = avctx->height;

libavcodec/vp9block.c:1228:21: Condition is false
1226.     int row = b->row, col = b->col;
1227.     AVFrame *ref1 = s->refs[s->refidx[b->ref[0]]];
1228.     AVFrame *ref2 = b->comp ? s->refs[s->refidx[b->ref[1]]] : NULL;
                          ^
1229.     int w = avctx->width, h = avctx->height;
1230.     ptrdiff_t ls_y = b->y_stride, ls_uv = b->uv_stride;

libavcodec/vp9block.c:1228:5: 
1226.     int row = b->row, col = b->col;
1227.     AVFrame *ref1 = s->refs[s->refidx[b->ref[0]]];
1228.     AVFrame *ref2 = b->comp ? s->refs[s->refidx[b->ref[1]]] : NULL;
          ^
1229.     int w = avctx->width, h = avctx->height;
1230.     ptrdiff_t ls_y = b->y_stride, ls_uv = b->uv_stride;

libavcodec/vp9block.c:1229:5: 
1227.     AVFrame *ref1 = s->refs[s->refidx[b->ref[0]]];
1228.     AVFrame *ref2 = b->comp ? s->refs[s->refidx[b->ref[1]]] : NULL;
1229.     int w = avctx->width, h = avctx->height;
          ^
1230.     ptrdiff_t ls_y = b->y_stride, ls_uv = b->uv_stride;
1231. 

libavcodec/vp9block.c:1230:5: 
1228.     AVFrame *ref2 = b->comp ? s->refs[s->refidx[b->ref[1]]] : NULL;
1229.     int w = avctx->width, h = avctx->height;
1230.     ptrdiff_t ls_y = b->y_stride, ls_uv = b->uv_stride;
          ^
1231. 
1232.     if (!ref1->data[0] || (b->comp && !ref2->data[0]))

libavcodec/vp9block.c:1232:10: Taking false branch
1230.     ptrdiff_t ls_y = b->y_stride, ls_uv = b->uv_stride;
1231. 
1232.     if (!ref1->data[0] || (b->comp && !ref2->data[0]))
               ^
1233.         return AVERROR_INVALIDDATA;
1234. 

libavcodec/vp9block.c:1232:28: Taking false branch
1230.     ptrdiff_t ls_y = b->y_stride, ls_uv = b->uv_stride;
1231. 
1232.     if (!ref1->data[0] || (b->comp && !ref2->data[0]))
                                 ^
1233.         return AVERROR_INVALIDDATA;
1234. 

libavcodec/vp9block.c:1236:9: Taking false branch
1234. 
1235.     // y inter pred
1236.     if (b->bs > BS_8x8) {
              ^
1237.         if (b->bs == BS_8x4) {
1238.             mc_luma_dir(s, s->dsp.mc[3][b->filter][0], b->dst[0], ls_y,

libavcodec/vp9block.c:1309:9: 
1307.         }
1308.     } else {
1309.         int bwl = bwlog_tab[0][b->bs];
              ^
1310.         int bw  = bwh_tab[0][b->bs][0] * 4;
1311.         int bh  = bwh_tab[0][b->bs][1] * 4;

libavcodec/vp9block.c:1310:9: 
1308.     } else {
1309.         int bwl = bwlog_tab[0][b->bs];
1310.         int bw  = bwh_tab[0][b->bs][0] * 4;
              ^
1311.         int bh  = bwh_tab[0][b->bs][1] * 4;
1312. 

libavcodec/vp9block.c:1311:9: 
1309.         int bwl = bwlog_tab[0][b->bs];
1310.         int bw  = bwh_tab[0][b->bs][0] * 4;
1311.         int bh  = bwh_tab[0][b->bs][1] * 4;
              ^
1312. 
1313.         mc_luma_dir(s, s->dsp.mc[bwl][b->filter][0], b->dst[0], ls_y,

libavcodec/vp9block.c:1313:9: Skipping mc_luma_dir(): empty list of specs
1311.         int bh  = bwh_tab[0][b->bs][1] * 4;
1312. 
1313.         mc_luma_dir(s, s->dsp.mc[bwl][b->filter][0], b->dst[0], ls_y,
              ^
1314.                     ref1->data[0], ref1->linesize[0],
1315.                     row << 3, col << 3, &b->mv[0][0], bw, bh, w, h);

libavcodec/vp9block.c:1317:13: Taking true branch
1315.                     row << 3, col << 3, &b->mv[0][0], bw, bh, w, h);
1316. 
1317.         if (b->comp)
                  ^
1318.             mc_luma_dir(s, s->dsp.mc[bwl][b->filter][1], b->dst[0], ls_y,
1319.                         ref2->data[0], ref2->linesize[0],

libavcodec/vp9block.c:1318:13: 
1316. 
1317.         if (b->comp)
1318.             mc_luma_dir(s, s->dsp.mc[bwl][b->filter][1], b->dst[0], ls_y,
                  ^
1319.                         ref2->data[0], ref2->linesize[0],
1320.                         row << 3, col << 3, &b->mv[0][1], bw, bh, w, h);
