This avoids crashing if calling the public java method
MediaCodec.getOutputFormat immediately after MediaCodec.start
(as the documentation example shows that one should do!).
Change-Id: Icd3dd7ab9ae9e8f2a67cef171ff176735de95f58
CHECK(msg->senderAwaitsResponse(&replyID));
if ((mState != STARTED && mState != FLUSHING)
- || (mFlags & kFlagStickyError)) {
+ || (mFlags & kFlagStickyError)
+ || mOutputFormat == NULL) {
sp<AMessage> response = new AMessage;
response->setInt32("err", INVALID_OPERATION);