mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
avformat/wavdec: add extra sample count check for G.729 files
Can 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
a0092cea46
commit
c1bfb99ff2
@ -440,6 +440,13 @@ break_loop:
|
||||
sample_count = 0;
|
||||
}
|
||||
|
||||
/* G.729 hack (for Ticket4577)
|
||||
* FIXME: Come up with cleaner, more general solution */
|
||||
if (st->codec->codec_id == AV_CODEC_ID_G729 && sample_count && (data_size << 3) > sample_count) {
|
||||
av_log(s, AV_LOG_WARNING, "ignoring wrong sample_count %"PRId64"\n", sample_count);
|
||||
sample_count = 0;
|
||||
}
|
||||
|
||||
if (!sample_count || av_get_exact_bits_per_sample(st->codec->codec_id) > 0)
|
||||
if ( st->codec->channels
|
||||
&& data_size
|
||||
|
Loading…
Reference in New Issue
Block a user