X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=aacdec_filter.c;h=5b84d07e12c4757c4393e0d5da54a3bcbed499a9;hp=209c9a4674adfba61f82f8d6e8fac05ec37ccff3;hb=d6f52cebbb178c884ba54ea782efa56a009493db;hpb=e8089cd5efad59a5eec689117acf563a38b8c6c7 diff --git a/aacdec_filter.c b/aacdec_filter.c index 209c9a46..5b84d07e 100644 --- a/aacdec_filter.c +++ b/aacdec_filter.c @@ -112,6 +112,7 @@ next_buffer: return; btr_merge(btrn, fn->min_iqs); len = btr_next_buffer(btrn, (char **)&inbuf); + len = PARA_MIN(len, (size_t)8192); consumed = 0; iqs = btr_get_input_queue_size(btrn); if (!padd->initialized) { @@ -185,7 +186,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;