aacdec: Print error message only once.
authorAndre Noll <maan@systemlinux.org>
Sat, 18 Dec 2010 12:00:04 +0000 (13:00 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 20 Jan 2011 20:23:54 +0000 (21:23 +0100)
No need to call NeAACDecGetErrorMessage() twice.

aacdec_filter.c

index 5b2d2a2..92f33d5 100644 (file)
@@ -167,12 +167,10 @@ next_buffer:
                ret = -E_AAC_DECODE;
                if (padd->error_count++ > MAX_ERRORS)
                        goto err;
-               PARA_ERROR_LOG("frame_error: %d (%s), consumed: %zu + %zd + %lu\n",
-                       err, NeAACDecGetErrorMessage(padd->frame_info.error),
+               PARA_ERROR_LOG("%s\n", NeAACDecGetErrorMessage(err));
+               PARA_ERROR_LOG("consumed: %zu + %zd + %lu\n",
                        padd->consumed_total, consumed,
                        padd->frame_info.bytesconsumed);
-               PARA_ERROR_LOG("%s\n", NeAACDecGetErrorMessage(
-                       padd->frame_info.error));
                if (consumed < len)
                        consumed++; /* catch 21 */
                goto success;