Loading media/libstagefright/FileSource.cpp +5 −7 Original line number Original line Diff line number Diff line Loading @@ -35,6 +35,10 @@ FileSource::FileSource(const char *filename) mDrmBuf(NULL){ mDrmBuf(NULL){ mFd = open(filename, O_LARGEFILE | O_RDONLY); mFd = open(filename, O_LARGEFILE | O_RDONLY); if (mFd >= 0) { mLength = lseek64(mFd, 0, SEEK_END); } } } FileSource::FileSource(int fd, int64_t offset, int64_t length) FileSource::FileSource(int fd, int64_t offset, int64_t length) Loading Loading @@ -116,17 +120,11 @@ status_t FileSource::getSize(off64_t *size) { return NO_INIT; return NO_INIT; } } if (mLength >= 0) { *size = mLength; *size = mLength; return OK; return OK; } } *size = lseek64(mFd, 0, SEEK_END); return OK; } sp<DecryptHandle> FileSource::DrmInitialization(const char *mime) { sp<DecryptHandle> FileSource::DrmInitialization(const char *mime) { if (mDrmManagerClient == NULL) { if (mDrmManagerClient == NULL) { mDrmManagerClient = new DrmManagerClient(); mDrmManagerClient = new DrmManagerClient(); Loading Loading
media/libstagefright/FileSource.cpp +5 −7 Original line number Original line Diff line number Diff line Loading @@ -35,6 +35,10 @@ FileSource::FileSource(const char *filename) mDrmBuf(NULL){ mDrmBuf(NULL){ mFd = open(filename, O_LARGEFILE | O_RDONLY); mFd = open(filename, O_LARGEFILE | O_RDONLY); if (mFd >= 0) { mLength = lseek64(mFd, 0, SEEK_END); } } } FileSource::FileSource(int fd, int64_t offset, int64_t length) FileSource::FileSource(int fd, int64_t offset, int64_t length) Loading Loading @@ -116,17 +120,11 @@ status_t FileSource::getSize(off64_t *size) { return NO_INIT; return NO_INIT; } } if (mLength >= 0) { *size = mLength; *size = mLength; return OK; return OK; } } *size = lseek64(mFd, 0, SEEK_END); return OK; } sp<DecryptHandle> FileSource::DrmInitialization(const char *mime) { sp<DecryptHandle> FileSource::DrmInitialization(const char *mime) { if (mDrmManagerClient == NULL) { if (mDrmManagerClient == NULL) { mDrmManagerClient = new DrmManagerClient(); mDrmManagerClient = new DrmManagerClient(); Loading