Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59abd7da authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "GenericSource2: fix data source reset/init"

parents 1d3734ad 3d2b89b1
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ NuPlayer2::GenericSource2::GenericSource2(
void NuPlayer2::GenericSource2::resetDataSource() {
    ALOGV("resetDataSource");

    mDisconnected = false;
    mUri.clear();
    mUriHeaders.clear();
    if (mFd >= 0) {
@@ -196,7 +197,11 @@ status_t NuPlayer2::GenericSource2::initFromDataSource() {
        }

        sp<AMediaExtractorWrapper> trackExtractor = new AMediaExtractorWrapper(AMediaExtractor_new());
        trackExtractor->setDataSource(mDataSourceWrapper->getAMediaDataSource());
        if (aSourceWrapper != NULL) {
            trackExtractor->setDataSource(aSourceWrapper->getAMediaDataSource());
        } else {
            trackExtractor->setDataSource(fd, mOffset, mLength);
        }

        const char *mime;
        sp<MetaData> meta = convertMediaFormatWrapperToMetaData(trackFormat);