aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-09-16 00:31:32 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-09-16 00:31:32 +0000
commitbf3a971c1237307880337aac4da552652f368056 (patch)
treef60031240d3cdbdb88e3586567ecca17a2ad6259 /libavcodec
parent53e9d0105f67ad24a7a519d0260d3f2f8f4f86de (diff)
downloadffmpeg-bf3a971c1237307880337aac4da552652f368056.tar.gz
Make decoder more robust by default against broken encoders.
Fixes issue540. Originally committed as revision 15336 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegaudiodec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index ce80217546..a0b7e35b3d 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1599,7 +1599,7 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
/* skip extension bits */
bits_left = end_pos2 - get_bits_count(&s->gb);
//av_log(NULL, AV_LOG_ERROR, "left:%d buf:%p\n", bits_left, s->in_gb.buffer);
- if (bits_left < 0/* || bits_left > 500*/) {
+ if (bits_left < 0 && s->error_recognition >= FF_ER_COMPLIANT) {
av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left);
s_index=0;
}else if(bits_left > 0 && s->error_recognition >= FF_ER_AGGRESSIVE){