aacdec: Don't eat full buffer on errors.
authorAndre Noll <maan@systemlinux.org>
Sun, 6 Apr 2014 10:13:10 +0000 (12:13 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 25 Mar 2017 10:54:36 +0000 (11:54 +0100)
On decoding errors, if the call to NeAACDecDecode() did not consume
anything from the input buffer, we currently throw away the full
buffer. This does not necessarily improve matters, so let's just eat
one byte and hope that subsequent calls succeed.

aacdec_filter.c

index c9f81512bf5398c76e51865f8bb4acdd5fa4a5f5..d85f33746d76c0a10e64303b15658c53fc8b4eda 100644 (file)
@@ -279,11 +279,6 @@ next_buffer:
                ret = -E_AAC_DECODE;
                if (padd->error_count++ > MAX_ERRORS)
                        goto err;
-               /* Suppress non-fatal bitstream error message at BOF/EOF */
-               if (len < fn->min_iqs || padd->consumed_total == 0) {
-                       consumed = len;
-                       goto success;
-               }
                PARA_ERROR_LOG("%s\n", NeAACDecGetErrorMessage(err));
                PARA_ERROR_LOG("consumed: %zu + %zu + %lu\n",
                        padd->consumed_total, consumed,