summaryrefslogtreecommitdiff
path: root/libavcodec/ra288.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-24 16:17:29 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-24 16:38:22 +0100
commit5c392bac9a11b3a2db9c0ec082695cbb2bfad430 (patch)
tree7aaa27163f8f0ca2f318a9eb5e3a474a6e4284a9 /libavcodec/ra288.c
parent387f50606c53a69167fd07053674d412514e910d (diff)
downloadffmpeg-5c392bac9a11b3a2db9c0ec082695cbb2bfad430.tar.gz
ra288: Check block align.
Fixes OOM Fixes Ticket1893 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ra288.c')
-rw-r--r--libavcodec/ra288.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index a9f67bf147..cefc99c685 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -67,6 +67,11 @@ static av_cold int ra288_decode_init(AVCodecContext *avctx)
avctx->channel_layout = AV_CH_LAYOUT_MONO;
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
+ if (avctx->block_align <= 0) {
+ av_log_ask_for_sample(avctx, "unsupported block align\n");
+ return AVERROR_PATCHWELCOME;
+ }
+
avpriv_float_dsp_init(&ractx->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
avcodec_get_frame_defaults(&ractx->frame);