vp9: uses ff_set_dimensions (which sets coded_width/height).

Fixes ticket 4935.
This commit is contained in:
Ronald S. Bultje 2015-10-24 09:24:41 -04:00
parent 52f84d82bd
commit 49d8a70dc5
1 changed files with 3 additions and 3 deletions

View File

@ -215,15 +215,15 @@ static int update_size(AVCodecContext *ctx, int w, int h, enum AVPixelFormat fmt
{ {
VP9Context *s = ctx->priv_data; VP9Context *s = ctx->priv_data;
uint8_t *p; uint8_t *p;
int bytesperpixel = s->bytesperpixel; int bytesperpixel = s->bytesperpixel, res;
av_assert0(w > 0 && h > 0); av_assert0(w > 0 && h > 0);
if (s->intra_pred_data[0] && w == ctx->width && h == ctx->height && ctx->pix_fmt == fmt) if (s->intra_pred_data[0] && w == ctx->width && h == ctx->height && ctx->pix_fmt == fmt)
return 0; return 0;
ctx->width = w; if ((res = ff_set_dimensions(ctx, w, h)) < 0)
ctx->height = h; return res;
ctx->pix_fmt = fmt; ctx->pix_fmt = fmt;
s->sb_cols = (w + 63) >> 6; s->sb_cols = (w + 63) >> 6;
s->sb_rows = (h + 63) >> 6; s->sb_rows = (h + 63) >> 6;