X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fvp9recon.c;h=9a4e7c7a039621889a607297451c803ba8d647db;hb=682b0e42e4a09d2d745293385a557fb5f316cb95;hp=49bb04e1f40fff3d902907043bb137cdd81aee60;hpb=52b44e9d15c0ee3c118ed68a0c2c737a9eb50ae9;p=ffmpeg diff --git a/libavcodec/vp9recon.c b/libavcodec/vp9recon.c index 49bb04e1f40..9a4e7c7a039 100644 --- a/libavcodec/vp9recon.c +++ b/libavcodec/vp9recon.c @@ -572,6 +572,16 @@ static av_always_inline void inter_recon(VP9TileData *td, int bytesperpixel) VP9Block *b = td->b; int row = td->row, col = td->col; + if (s->mvscale[b->ref[0]][0] == REF_INVALID_SCALE || + (b->comp && s->mvscale[b->ref[1]][0] == REF_INVALID_SCALE)) { + if (!s->td->error_info) { + s->td->error_info = AVERROR_INVALIDDATA; + av_log(NULL, AV_LOG_ERROR, "Bitstream not supported, " + "reference frame has invalid dimensions\n"); + } + return; + } + if (s->mvscale[b->ref[0]][0] || (b->comp && s->mvscale[b->ref[1]][0])) { if (bytesperpixel == 1) { inter_pred_scaled_8bpp(td);