[FFmpeg-cvslog] avformat/wavdec: Do not discard sample_count due to rounding
Michael Niedermayer
git at videolan.org
Thu Aug 13 12:50:18 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Aug 13 12:13:51 2015 +0200| [4ec4454ccf72ceca06393b4b3759e3412cf885da] | committer: Michael Niedermayer
avformat/wavdec: Do not discard sample_count due to rounding
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ec4454ccf72ceca06393b4b3759e3412cf885da
---
libavformat/wavdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 8b48fc8..85e7da6 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -435,7 +435,7 @@ break_loop:
}
if ( data_size > 0 && sample_count && st->codec->channels
- && (data_size << 3) / sample_count / st->codec->channels > st->codec->bits_per_coded_sample) {
+ && (data_size << 3) / sample_count / st->codec->channels > st->codec->bits_per_coded_sample + 1) {
av_log(s, AV_LOG_WARNING, "ignoring wrong sample_count %"PRId64"\n", sample_count);
sample_count = 0;
}
More information about the ffmpeg-cvslog
mailing list