mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/dct: Propagate error code from ff_rdft_init()
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
bb2d8708f7
commit
0505b35a38
|
@ -178,6 +178,7 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
|
|||
{
|
||||
int n = 1 << nbits;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
memset(s, 0, sizeof(*s));
|
||||
|
||||
|
@ -194,9 +195,9 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
|
|||
if (!s->csc2)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
if (ff_rdft_init(&s->rdft, nbits, inverse == DCT_III) < 0) {
|
||||
if ((ret = ff_rdft_init(&s->rdft, nbits, inverse == DCT_III)) < 0) {
|
||||
av_freep(&s->csc2);
|
||||
return -1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (i = 0; i < n / 2; i++)
|
||||
|
|
Loading…
Reference in New Issue