# HG changeset patch # User michael # Date 1221525092 0 # Node ID 2a611af7bcbe5a06bb3dbe0c86fa7e31b41d10f3 # Parent 4f0e33b1a228cbcb6ff4db19b547c83f4fab5326 Make decoder more robust by default against broken encoders. Fixes issue540. diff -r 4f0e33b1a228 -r 2a611af7bcbe mpegaudiodec.c --- a/mpegaudiodec.c Mon Sep 15 20:30:22 2008 +0000 +++ b/mpegaudiodec.c Tue Sep 16 00:31:32 2008 +0000 @@ -1599,7 +1599,7 @@ /* 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){