g2m: Relax resolution change constraints

Do not fail when original resolution is smaller than current one,
as the frame buffer is resized automatically.

Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
This commit is contained in:
Vittorio Giovara 2015-10-07 15:16:44 +02:00 committed by Luca Barbato
parent 39f01e346c
commit 3a4d369ea4
1 changed files with 1 additions and 2 deletions

View File

@ -1410,8 +1410,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
} }
c->width = bytestream2_get_be32(&bc); c->width = bytestream2_get_be32(&bc);
c->height = bytestream2_get_be32(&bc); c->height = bytestream2_get_be32(&bc);
if (c->width < 16 || c->width > c->orig_width || if (c->width < 16 || c->height < 16) {
c->height < 16 || c->height > c->orig_height) {
av_log(avctx, AV_LOG_ERROR, av_log(avctx, AV_LOG_ERROR,
"Invalid frame dimensions %dx%d\n", "Invalid frame dimensions %dx%d\n",
c->width, c->height); c->width, c->height);