Fixes ticket #3862. As a side effect, this also fixes aac_latm in wav. Signed-off-by: James Almer <jamr...@gmail.com> --- Maybe a check for channels <= 0 should be also added to ff_get_wav_header() right after the sample_rate one?
libavformat/wavdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 7e0d5f4..9c4e2df 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -402,7 +402,8 @@ break_loop: avio_seek(pb, data_ofs, SEEK_SET); - if (data_size > 0 && sample_count && data_size / sample_count / st->codec->channels > 8) { + if ( data_size > 0 && sample_count && st->codec->channels + && data_size / sample_count / st->codec->channels > 8) { av_log(s, AV_LOG_WARNING, "ignoring wrong sample_count %"PRId64"\n", sample_count); sample_count = 0; } -- 1.8.5.5 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel