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

Commit 61592c6d authored by Robert Shih's avatar Robert Shih Committed by Android (Google) Code Review
Browse files

Merge "NdkMediaDataSource: fix getAvailableSize"

parents 89d88f00 ea38886d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ NdkDataSource::NdkDataSource(AMediaDataSource *dataSource)
    AMediaDataSource_setGetSize(mDataSource, dataSource->getSize);
    AMediaDataSource_setClose(mDataSource, dataSource->close);
    AMediaDataSource_setUserdata(mDataSource, dataSource->userdata);
    AMediaDataSource_setGetAvailableSize(mDataSource, dataSource->getAvailableSize);
    mDataSource->mImpl = dataSource->mImpl;
    mDataSource->mFlags = dataSource->mFlags;
}
+2 −2
Original line number Diff line number Diff line
@@ -43,8 +43,8 @@ void DataSource_close(void *userdata) {
ssize_t DataSource_getAvailableSize(void *userdata, off64_t offset) {
    off64_t size = -1;
    DataSource *source = static_cast<DataSource *>(userdata);
    status_t err = source->getAvailableSize(offset, &size);
    return  err == OK ? size : -1;
    source->getAvailableSize(offset, &size);
    return  size;
}

}  // namespace android