Loading include/media/stagefright/ACodec.h +1 −0 Original line number Diff line number Diff line Loading @@ -188,6 +188,7 @@ private: bool mSentFormat; bool mIsEncoder; bool mUseMetadataOnEncoderOutput; bool mFatalError; bool mShutdownInProgress; bool mIsConfiguredForAdaptivePlayback; Loading media/libstagefright/ACodec.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -362,6 +362,7 @@ ACodec::ACodec() mSentFormat(false), mIsEncoder(false), mUseMetadataOnEncoderOutput(false), mFatalError(false), mShutdownInProgress(false), mIsConfiguredForAdaptivePlayback(false), mEncoderDelay(0), Loading Loading @@ -812,6 +813,12 @@ ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() { ANativeWindowBuffer *buf; int fenceFd = -1; CHECK(mNativeWindow.get() != NULL); if (mFatalError) { ALOGW("not dequeuing from native window due to fatal error"); return NULL; } if (native_window_dequeue_buffer_and_wait(mNativeWindow.get(), &buf) != 0) { ALOGE("dequeueBuffer failed."); return NULL; Loading Loading @@ -2692,6 +2699,9 @@ void ACodec::signalError(OMX_ERRORTYPE error, status_t internalError) { sp<AMessage> notify = mNotify->dup(); notify->setInt32("what", ACodec::kWhatError); notify->setInt32("omx-error", error); mFatalError = true; notify->setInt32("err", internalError); notify->post(); } Loading Loading
include/media/stagefright/ACodec.h +1 −0 Original line number Diff line number Diff line Loading @@ -188,6 +188,7 @@ private: bool mSentFormat; bool mIsEncoder; bool mUseMetadataOnEncoderOutput; bool mFatalError; bool mShutdownInProgress; bool mIsConfiguredForAdaptivePlayback; Loading
media/libstagefright/ACodec.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -362,6 +362,7 @@ ACodec::ACodec() mSentFormat(false), mIsEncoder(false), mUseMetadataOnEncoderOutput(false), mFatalError(false), mShutdownInProgress(false), mIsConfiguredForAdaptivePlayback(false), mEncoderDelay(0), Loading Loading @@ -812,6 +813,12 @@ ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() { ANativeWindowBuffer *buf; int fenceFd = -1; CHECK(mNativeWindow.get() != NULL); if (mFatalError) { ALOGW("not dequeuing from native window due to fatal error"); return NULL; } if (native_window_dequeue_buffer_and_wait(mNativeWindow.get(), &buf) != 0) { ALOGE("dequeueBuffer failed."); return NULL; Loading Loading @@ -2692,6 +2699,9 @@ void ACodec::signalError(OMX_ERRORTYPE error, status_t internalError) { sp<AMessage> notify = mNotify->dup(); notify->setInt32("what", ACodec::kWhatError); notify->setInt32("omx-error", error); mFatalError = true; notify->setInt32("err", internalError); notify->post(); } Loading