Loading media/libmediaplayerservice/nuplayer/GenericSource.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -418,7 +418,7 @@ void NuPlayer::GenericSource::onPrepareAsync() { sp<IMediaExtractorService> mediaExService( interface_cast<IMediaExtractorService>(binder)); sp<IDataSource> source; mediaExService->makeIDataSource(mFd, mOffset, mLength, &source); mediaExService->makeIDataSource(base::unique_fd(dup(mFd.get())), mOffset, mLength, &source); ALOGV("IDataSource(FileSource): %p %d %lld %lld", source.get(), mFd.get(), (long long)mOffset, (long long)mLength); if (source.get() != nullptr) { Loading services/mediaextractor/MediaExtractorService.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -61,13 +61,11 @@ MediaExtractorService::~MediaExtractorService() { } ::android::binder::Status MediaExtractorService::makeIDataSource( const base::unique_fd &fd, base::unique_fd fd, int64_t offset, int64_t length, ::android::sp<::android::IDataSource>* _aidl_return) { // the caller will close the fd owned by the unique_fd upon return of this function, // so we need to dup() it to retain it. sp<DataSource> source = DataSourceFactory::getInstance()->CreateFromFd(dup(fd.get()), offset, length); sp<DataSource> source = DataSourceFactory::getInstance()->CreateFromFd(fd.release(), offset, length); *_aidl_return = CreateIDataSourceFromDataSource(source); return binder::Status::ok(); } Loading services/mediaextractor/MediaExtractorService.h +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public: ::android::sp<::android::IMediaExtractor>* _aidl_return); virtual ::android::binder::Status makeIDataSource( const base::unique_fd &fd, base::unique_fd fd, int64_t offset, int64_t length, ::android::sp<::android::IDataSource>* _aidl_return); Loading Loading
media/libmediaplayerservice/nuplayer/GenericSource.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -418,7 +418,7 @@ void NuPlayer::GenericSource::onPrepareAsync() { sp<IMediaExtractorService> mediaExService( interface_cast<IMediaExtractorService>(binder)); sp<IDataSource> source; mediaExService->makeIDataSource(mFd, mOffset, mLength, &source); mediaExService->makeIDataSource(base::unique_fd(dup(mFd.get())), mOffset, mLength, &source); ALOGV("IDataSource(FileSource): %p %d %lld %lld", source.get(), mFd.get(), (long long)mOffset, (long long)mLength); if (source.get() != nullptr) { Loading
services/mediaextractor/MediaExtractorService.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -61,13 +61,11 @@ MediaExtractorService::~MediaExtractorService() { } ::android::binder::Status MediaExtractorService::makeIDataSource( const base::unique_fd &fd, base::unique_fd fd, int64_t offset, int64_t length, ::android::sp<::android::IDataSource>* _aidl_return) { // the caller will close the fd owned by the unique_fd upon return of this function, // so we need to dup() it to retain it. sp<DataSource> source = DataSourceFactory::getInstance()->CreateFromFd(dup(fd.get()), offset, length); sp<DataSource> source = DataSourceFactory::getInstance()->CreateFromFd(fd.release(), offset, length); *_aidl_return = CreateIDataSourceFromDataSource(source); return binder::Status::ok(); } Loading
services/mediaextractor/MediaExtractorService.h +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public: ::android::sp<::android::IMediaExtractor>* _aidl_return); virtual ::android::binder::Status makeIDataSource( const base::unique_fd &fd, base::unique_fd fd, int64_t offset, int64_t length, ::android::sp<::android::IDataSource>* _aidl_return); Loading