Fix ERROR_IO due to timeout on video stream and corrupt samples

This change applies to the wv extractor when used in conjunction
with new MediaCodec model.

Change-Id: I999990ff41d35641110a58472f1cdb8c4c7db02e
related-to-bug: 5986621
This commit is contained in:
Jeff Tinker
2012-04-27 18:52:09 -07:00
parent d4241dddd3
commit ec2d703970
6 changed files with 33 additions and 11 deletions

View File

@@ -200,8 +200,11 @@ void WVMExtractorImpl::SocketInfoCallback(int fd, int closing, void *context)
WVMExtractorImpl *obj = (WVMExtractorImpl *)context;
if (!obj || !obj->mUIDIsSet) {
ALOGW("SocketInfoCallback - UID not set!");
if (!obj) {
ALOGW("SocketInfoCallback: missing context!");
return;
} else if (!obj->mUIDIsSet) {
ALOGW("SocketInfoCallback: UID not set!");
return;
}
@@ -331,8 +334,10 @@ status_t WVMExtractorImpl::readMetaData()
}
}
mAudioSource = new WVMMediaSource(mSession, WV_EsSelector_Audio, audioMetaData, mIsLiveStream);
mVideoSource = new WVMMediaSource(mSession, WV_EsSelector_Video, videoMetaData, mIsLiveStream);
mAudioSource = new WVMMediaSource(mSession, WV_EsSelector_Audio, audioMetaData,
mIsLiveStream, mCryptoPluginMode);
mVideoSource = new WVMMediaSource(mSession, WV_EsSelector_Video, videoMetaData,
mIsLiveStream, mCryptoPluginMode);
// Since the WVExtractor goes away soon after this, we delegate ownership of some resources
// to the constructed media source