mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-01 20:32:59 +00:00
sonic: set avctx->channels in sonic_decode_init
Otherwise it can be 0 in sonic_decode_frame, causing SIGFPE crashes.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 58995f647b
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
27d50fb2d5
commit
da13957525
@ -900,6 +900,7 @@ static av_cold int sonic_decode_init(AVCodecContext *avctx)
|
||||
av_log(avctx, AV_LOG_ERROR, "Only mono and stereo streams are supported by now\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
avctx->channels = s->channels;
|
||||
|
||||
s->lossless = get_bits1(&gb);
|
||||
if (!s->lossless)
|
||||
|
Loading…
Reference in New Issue
Block a user