Skip to content
Snippets Groups Projects
Commit 853c1fb6 authored by James Almer's avatar James Almer Committed by Michael Niedermayer
Browse files

lavf/wavdec: add sanity check for AVCodecContext.channels


Fixes ticket #3862.
As a side effect, this also fixes aac_latm in wav.

Signed-off-by: default avatarJames Almer <jamrial@gmail.com>
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 44e95a01
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment