mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
wavdec: make sample count check more precise
May be used to fix Ticket4577 Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9ec17e45b2
commit
13d605e090
@ -430,7 +430,7 @@ break_loop:
|
||||
avio_seek(pb, data_ofs, SEEK_SET);
|
||||
|
||||
if ( data_size > 0 && sample_count && st->codec->channels
|
||||
&& data_size / sample_count / st->codec->channels > 8) {
|
||||
&& (data_size << 3) / sample_count / st->codec->channels > st->codec->bits_per_coded_sample) {
|
||||
av_log(s, AV_LOG_WARNING, "ignoring wrong sample_count %"PRId64"\n", sample_count);
|
||||
sample_count = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user