Can be used to fix Ticket4577
Signed-off-by: Ganesh Ajjanagadde <[email protected]>
---
libavformat/wavdec.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 1803b5c..8b48fc8 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -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
--
2.5.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel