Browse Source

avcodec/g2meet: check the return code of ff_set_dimensions()

This is currently redundant as the checks before it are tighter than
the checks in ff_set_dimensions() but its more robust not to depend
on that.

Fixes CID1135739
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 12 years ago
parent
commit
3af9d8269e
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      libavcodec/g2meet.c

+ 5
- 2
libavcodec/g2meet.c View File

@@ -697,8 +697,11 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
ret = AVERROR_INVALIDDATA;
goto header_fail;
}
if (c->width != avctx->width || c->height != avctx->height)
ff_set_dimensions(avctx, c->width, c->height);
if (c->width != avctx->width || c->height != avctx->height) {
ret = ff_set_dimensions(avctx, c->width, c->height);
if (ret < 0)
goto header_fail;
}
c->compression = bytestream2_get_be32(&bc);
if (c->compression != 2 && c->compression != 3) {
av_log(avctx, AV_LOG_ERROR,


Loading…
Cancel
Save