Loading media/libmediaplayerservice/nuplayer/GenericSource.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -379,6 +379,11 @@ void NuPlayer::GenericSource::onPrepareAsync() { source.get(), mFd, (long long)mOffset, (long long)mLength); if (source.get() != nullptr) { mDataSource = DataSource::CreateFromIDataSource(source); if (mDataSource != nullptr) { // Close the local file descriptor as it is not needed anymore. close(mFd); mFd = -1; } } else { ALOGW("extractor service cannot make data source"); } Loading @@ -390,7 +395,9 @@ void NuPlayer::GenericSource::onPrepareAsync() { ALOGD("FileSource local"); mDataSource = new FileSource(mFd, mOffset, mLength); } // TODO: close should always be done on mFd, see the lines following // DataSource::CreateFromIDataSource above, // and the FileSource constructor should dup the mFd argument as needed. mFd = -1; } Loading Loading
media/libmediaplayerservice/nuplayer/GenericSource.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -379,6 +379,11 @@ void NuPlayer::GenericSource::onPrepareAsync() { source.get(), mFd, (long long)mOffset, (long long)mLength); if (source.get() != nullptr) { mDataSource = DataSource::CreateFromIDataSource(source); if (mDataSource != nullptr) { // Close the local file descriptor as it is not needed anymore. close(mFd); mFd = -1; } } else { ALOGW("extractor service cannot make data source"); } Loading @@ -390,7 +395,9 @@ void NuPlayer::GenericSource::onPrepareAsync() { ALOGD("FileSource local"); mDataSource = new FileSource(mFd, mOffset, mLength); } // TODO: close should always be done on mFd, see the lines following // DataSource::CreateFromIDataSource above, // and the FileSource constructor should dup the mFd argument as needed. mFd = -1; } Loading