Backed out changeset ed6f3ec5a71b (bug 1050667)

This commit is contained in:
Carsten "Tomcat" Book 2014-09-19 13:21:30 +02:00
parent c711249807
commit b8f2fead4f
2 changed files with 1 additions and 21 deletions

View File

@ -285,7 +285,6 @@ MediaCodecReader::MediaCodecReader(AbstractMediaDecoder* aDecoder)
, mParseDataFromCache(true)
, mNextParserPosition(INT64_C(0))
, mParsedDataLength(INT64_C(0))
, mIsWaitingResources(false)
{
mHandler = new MessageHandler(this);
mVideoListener = new VideoResourceListener(this);
@ -305,14 +304,7 @@ MediaCodecReader::Init(MediaDecoderReader* aCloneDonor)
bool
MediaCodecReader::IsWaitingMediaResources()
{
return mIsWaitingResources;
}
void
MediaCodecReader::UpdateIsWaitingMediaResources()
{
mIsWaitingResources = (mVideoTrack.mCodec != nullptr) &&
(!mVideoTrack.mCodec->allocated());
return mVideoTrack.mCodec != nullptr && !mVideoTrack.mCodec->allocated();
}
bool
@ -669,11 +661,6 @@ MediaCodecReader::ReadMetadata(MediaInfo* aInfo,
return NS_ERROR_FAILURE;
}
// Bug 1050667, both MediaDecoderStateMachine and MediaCodecReader
// relies on IsWaitingMediaResources() function. And the waiting state will be
// changed by binder thread, so we store the waiting state in a cache value to
// make them in the same waiting state.
UpdateIsWaitingMediaResources();
if (IsWaitingMediaResources()) {
return NS_OK;
}

View File

@ -152,14 +152,7 @@ protected:
virtual bool CreateExtractor();
// Check the underlying HW resource is available and store the result in
// mIsWaitingResources.
void UpdateIsWaitingMediaResources();
android::sp<android::MediaExtractor> mExtractor;
// A cache value updated by UpdateIsWaitingMediaResources(), makes the
// "waiting resources state" is synchronous to StateMachine.
bool mIsWaitingResources;
private:
// An intermediary class that can be managed by android::sp<T>.