From: Jun Zhao <[email protected]> avpriv_mpeg4audio_get_config will use MPEG4AudioConfig.chan_config to get the MPEG4AudioConfig.channels, but if we use a uninitialized variable, we will get an indeterminate channels, add an explicit initialization for this case.
Signed-off-by: Jun Zhao <[email protected]> --- libavcodec/mpegaudiodec_template.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c index 9cce88e..69c43c8 100644 --- a/libavcodec/mpegaudiodec_template.c +++ b/libavcodec/mpegaudiodec_template.c @@ -1843,7 +1843,7 @@ static av_cold int decode_close_mp3on4(AVCodecContext * avctx) static av_cold int decode_init_mp3on4(AVCodecContext * avctx) { MP3On4DecodeContext *s = avctx->priv_data; - MPEG4AudioConfig cfg; + MPEG4AudioConfig cfg = {0}; int i; if ((avctx->extradata_size < 2) || !avctx->extradata) { -- 1.7.1 _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
