diff options
-rw-r--r-- | include/media/stagefright/FileSource.h | 2 | ||||
-rw-r--r-- | media/libstagefright/FileSource.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/media/stagefright/FileSource.h b/include/media/stagefright/FileSource.h index 7051b20..f4f874f 100644 --- a/include/media/stagefright/FileSource.h +++ b/include/media/stagefright/FileSource.h @@ -61,7 +61,7 @@ private: sp<DecryptHandle> mDecryptHandle; DrmManagerClient *mDrmManagerClient; int64_t mDrmBufOffset; - size_t mDrmBufSize; + ssize_t mDrmBufSize; unsigned char *mDrmBuf; ssize_t readAtDRM(off64_t offset, void *data, size_t size); diff --git a/media/libstagefright/FileSource.cpp b/media/libstagefright/FileSource.cpp index f7b1a02..eaa41ff 100644 --- a/media/libstagefright/FileSource.cpp +++ b/media/libstagefright/FileSource.cpp @@ -168,7 +168,7 @@ ssize_t FileSource::readAtDRM(off64_t offset, void *data, size_t size) { } if (mDrmBuf != NULL && mDrmBufSize > 0 && (offset + mOffset) >= mDrmBufOffset - && (offset + mOffset + size) <= (mDrmBufOffset + mDrmBufSize)) { + && (offset + mOffset + size) <= static_cast<size_t>(mDrmBufOffset + mDrmBufSize)) { /* Use buffered data */ memcpy(data, (void*)(mDrmBuf+(offset+mOffset-mDrmBufOffset)), size); return size; @@ -179,7 +179,7 @@ ssize_t FileSource::readAtDRM(off64_t offset, void *data, size_t size) { DRM_CACHE_SIZE, offset + mOffset); if (mDrmBufSize > 0) { int64_t dataRead = 0; - dataRead = size > mDrmBufSize ? mDrmBufSize : size; + dataRead = size > static_cast<size_t>(mDrmBufSize) ? mDrmBufSize : size; memcpy(data, (void*)mDrmBuf, dataRead); return dataRead; } else { |