aboutsummaryrefslogtreecommitdiffstats
path: root/libAACenc/src/aacenc_lib.cpp
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2018-06-29 16:35:57 +0200
committerJean-Michel Trivi <jmtrivi@google.com>2018-12-26 19:50:13 -0500
commit2aa9167aa698ffb99526e27fd8feac5a4305974b (patch)
treeb3a70e1a52f90a75d6ac3577d0045ffe12cbfcbb /libAACenc/src/aacenc_lib.cpp
parentf59fd73d4443b015b11a362c807f6b828658a799 (diff)
downloadfdk-aac-2aa9167aa698ffb99526e27fd8feac5a4305974b.tar.gz
fdk-aac-2aa9167aa698ffb99526e27fd8feac5a4305974b.tar.bz2
fdk-aac-2aa9167aa698ffb99526e27fd8feac5a4305974b.zip
Encoder returned an error while explicit flushing
Bug: 112663571 Test: atest EncoderTest Change-Id: Ieaaaf2c32786a8344ba912f4587298654d508e67
Diffstat (limited to 'libAACenc/src/aacenc_lib.cpp')
-rw-r--r--libAACenc/src/aacenc_lib.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libAACenc/src/aacenc_lib.cpp b/libAACenc/src/aacenc_lib.cpp
index 11db3da..f92cff4 100644
--- a/libAACenc/src/aacenc_lib.cpp
+++ b/libAACenc/src/aacenc_lib.cpp
@@ -1733,9 +1733,10 @@ AACENC_ERROR aacEncEncode(const HANDLE_AACENCODER hAacEncoder,
}
/* check if buffer descriptors are filled out properly. */
- if ((AACENC_OK != validateBufDesc(inBufDesc)) ||
- (AACENC_OK != validateBufDesc(outBufDesc)) || (inargs == NULL) ||
- (outargs == NULL)) {
+ if ((inargs == NULL) || (outargs == NULL) ||
+ ((AACENC_OK != validateBufDesc(inBufDesc)) &&
+ (inargs->numInSamples > 0)) ||
+ (AACENC_OK != validateBufDesc(outBufDesc))) {
err = AACENC_UNSUPPORTED_PARAMETER;
goto bail;
}