X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=aacdec_filter.c;h=1127fc1132b90d56169c34d732c9343e47e8fa43;hp=2dd68448b3b130172ba3417cb20eedcfc1fff262;hb=d544360d5aef3afc27174777a6616f0393bba693;hpb=4d425382c007b200121b4be5120db1acd30d292f diff --git a/aacdec_filter.c b/aacdec_filter.c index 2dd68448..1127fc11 100644 --- a/aacdec_filter.c +++ b/aacdec_filter.c @@ -100,7 +100,7 @@ next_buffer: return; btr_merge(btrn, fn->min_iqs); len = btr_next_buffer(btrn, (char **)&inbuf); - len = PARA_MAX(len, (size_t)8192); + len = PARA_MIN(len, (size_t)8192); consumed = 0; iqs = btr_get_input_queue_size(btrn); if (!padd->initialized) { @@ -174,7 +174,8 @@ next_buffer: padd->frame_info.bytesconsumed); PARA_ERROR_LOG("%s\n", NeAACDecGetErrorMessage( padd->frame_info.error)); - consumed++; /* catch 21 */ + if (consumed < len) + consumed++; /* catch 21 */ goto success; } padd->error_count = 0;