diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-17 16:04:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-17 16:04:38 +0200 |
commit | 8cff853b23362b0cb88e6d424e3362a437c1a6b7 (patch) | |
tree | 99159042d46610fc91683654f216a47b69a87f4f /libavcodec/qdm2.c | |
parent | 0a946599f881b5129c4af2f4678dca40b6668cc0 (diff) | |
parent | 69f6f03cd16a09e4e848b4e82bae4993bc361cd0 (diff) | |
download | ffmpeg-8cff853b23362b0cb88e6d424e3362a437c1a6b7.tar.gz |
Merge commit '69f6f03cd16a09e4e848b4e82bae4993bc361cd0'
* commit '69f6f03cd16a09e4e848b4e82bae4993bc361cd0':
rv10: cosmetics, reformat
qdm2: check that the FFT size is a power of 2
Conflicts:
libavcodec/rv10.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/qdm2.c')
-rw-r--r-- | libavcodec/qdm2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c index 108c327d53..5482e9b6aa 100644 --- a/libavcodec/qdm2.c +++ b/libavcodec/qdm2.c @@ -1883,6 +1883,10 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "Unknown FFT order (%d), contact the developers!\n", s->fft_order); return -1; } + if (s->fft_size != (1 << (s->fft_order - 1))) { + av_log(avctx, AV_LOG_ERROR, "FFT size %d not power of 2.\n", s->fft_size); + return AVERROR_INVALIDDATA; + } ff_rdft_init(&s->rdft_ctx, s->fft_order, IDFT_C2R); ff_mpadsp_init(&s->mpadsp); |