diff options
-rw-r--r-- | libavcodec/eatgq.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c index 0a3e0f6075..1ead5f7adc 100644 --- a/libavcodec/eatgq.c +++ b/libavcodec/eatgq.c @@ -216,9 +216,10 @@ static int tgq_decode_frame(AVCodecContext *avctx, s->height = bytestream2_get_le16u(&s->gb); } - if (s->avctx->width!=s->width || s->avctx->height!=s->height) { - avcodec_set_dimensions(s->avctx, s->width, s->height); - } + ret = ff_set_dimensions(s->avctx, s->width, s->height); + if (ret < 0) + return ret; + tgq_calculate_qtable(s, bytestream2_get_byteu(&s->gb)); bytestream2_skip(&s->gb, 3); |