diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2018-12-26 18:14:05 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-12-26 18:14:05 -0800 |
commit | a98beef0cf4e9887d179bf3725c8ea77c1b11b86 (patch) | |
tree | b9497f8244441d6df7227dfcd73f0aa81350f58c | |
parent | 466adf2a1b74e4ec204e4852c18d8a5267dd5e38 (diff) | |
parent | 2f5612ef84892f51cf9c13dd245f4fbf9b4d0ab0 (diff) | |
download | fdk-aac-a98beef0cf4e9887d179bf3725c8ea77c1b11b86.tar.gz fdk-aac-a98beef0cf4e9887d179bf3725c8ea77c1b11b86.tar.bz2 fdk-aac-a98beef0cf4e9887d179bf3725c8ea77c1b11b86.zip |
Merge "Encoder returned an error while explicit flushing"
am: 2f5612ef84
Change-Id: I5cab81980db628f6f4cbe9f0a8bf92d3dd2e76a5
-rw-r--r-- | libAACenc/src/aacenc_lib.cpp | 7 |
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; } |