Fix all the recent problems Justin had run into with the AC3 parser,
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 22 Sep 2008 03:00:26 +0000 (03:00 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 22 Sep 2008 03:00:26 +0000 (03:00 +0000)
including issue 459.

Originally committed as revision 15381 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/aac_ac3_parser.c

index d0c912a..20a9897 100644 (file)
@@ -51,7 +51,7 @@ get_next:
             }else{
                 i-= s->header_size -1;
                 s->remaining_size = len;
-                if(!new_frame_start){
+                if(!new_frame_start || pc->index+i<=0){
                     s->remaining_size += i;
                     goto get_next;
                 }