- avctx->height = bytestream2_get_le32(gbc);
- avctx->width = bytestream2_get_le32(gbc);
- ret = av_image_check_size(avctx->width, avctx->height, 0, avctx);
+ height = bytestream2_get_le32(gbc);
+ width = bytestream2_get_le32(gbc);
+ ret = ff_set_dimensions(avctx, width, height);