aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2018-12-26 18:31:39 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-12-26 18:31:39 -0800
commitd145d90619598cdcd441c18505a1b79d0300eff2 (patch)
tree985a54bdcb2df2380a2ec0738cba5869ed7b70f8
parentd07eeb453f9bc1cb05fb03391a6a9a1dab2f6fae (diff)
parenta98beef0cf4e9887d179bf3725c8ea77c1b11b86 (diff)
downloadfdk-aac-d145d90619598cdcd441c18505a1b79d0300eff2.tar.gz
fdk-aac-d145d90619598cdcd441c18505a1b79d0300eff2.tar.bz2
fdk-aac-d145d90619598cdcd441c18505a1b79d0300eff2.zip
Merge "Encoder returned an error while explicit flushing" am: 2f5612ef84
am: a98beef0cf Change-Id: Ie8198a53d1666d97ae586c9984b8ffcdb6c528c7
-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;
}