mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
avcodec/diracdec: Check ff_set_dimensions() for failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e839db2288
commit
73840bbe4e
@ -1989,7 +1989,12 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ff_set_dimensions(avctx, dsh->width, dsh->height);
|
ret = ff_set_dimensions(avctx, dsh->width, dsh->height);
|
||||||
|
if (ret < 0) {
|
||||||
|
av_freep(&dsh);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
ff_set_sar(avctx, dsh->sample_aspect_ratio);
|
ff_set_sar(avctx, dsh->sample_aspect_ratio);
|
||||||
avctx->pix_fmt = dsh->pix_fmt;
|
avctx->pix_fmt = dsh->pix_fmt;
|
||||||
avctx->color_range = dsh->color_range;
|
avctx->color_range = dsh->color_range;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user