[FFmpeg-cvslog] avcodec/dct: Propagate error code from ff_rdft_init()
Michael Niedermayer
git at videolan.org
Wed Jan 2 01:24:02 EET 2019
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Dec 31 18:51:20 2018 +0100| [0505b35a38c5086ab21b4305907d48c35458ad98] | committer: Michael Niedermayer
avcodec/dct: Propagate error code from ff_rdft_init()
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0505b35a38c5086ab21b4305907d48c35458ad98
---
libavcodec/dct.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/dct.c b/libavcodec/dct.c
index cca51eeaf8..52f082d062 100644
--- a/libavcodec/dct.c
+++ b/libavcodec/dct.c
@@ -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++)
More information about the ffmpeg-cvslog
mailing list