diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-07-29 00:28:15 -0400 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-29 13:13:09 +0200 |
commit | 13d605e090bd408a1040624f7173bcc142f81410 (patch) | |
tree | 635dc0480f74a28c8653abf8115275c58fdc2098 /libavformat | |
parent | 9ec17e45b28ab200d637ae2af772cbfdfd1266e9 (diff) | |
download | ffmpeg-13d605e090bd408a1040624f7173bcc142f81410.tar.gz |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/wavdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 9bc8c4f44d..db42f59826 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -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; } |