X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=aacdec_filter.c;h=5b84d07e12c4757c4393e0d5da54a3bcbed499a9;hp=d48b18e03d729c5617455aa39eb5de91f0ea27ef;hb=d6f52cebbb178c884ba54ea782efa56a009493db;hpb=59df964251d4e6b71b4ce6d02fdbb6e11643acab diff --git a/aacdec_filter.c b/aacdec_filter.c index d48b18e0..5b84d07e 100644 --- a/aacdec_filter.c +++ b/aacdec_filter.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2009 Andre Noll + * Copyright (C) 2006-2010 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -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;