Merge "Encoder returned an error while explicit flushing"

am: 2f5612ef84

Change-Id: I5cab81980db628f6f4cbe9f0a8bf92d3dd2e76a5
This commit is contained in:
Jean-Michel Trivi 2018-12-26 18:14:05 -08:00 committed by android-build-merger
commit a98beef0cf
1 changed files with 4 additions and 3 deletions

View File

@ -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;
}