diff options
author | Colin Cross <ccross@google.com> | 2014-04-14 17:12:27 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-04-14 17:16:02 -0700 |
commit | f6d0c1fd6d9e697bb3a891fae14c7e9d4b685de6 (patch) | |
tree | 7278734ca980774c0ec5b5d6baa30a8587136eb0 /media/libstagefright/httplive | |
parent | 9829344d526f87ca745208f04216ec795b239581 (diff) | |
download | frameworks_av-f6d0c1fd6d9e697bb3a891fae14c7e9d4b685de6.zip frameworks_av-f6d0c1fd6d9e697bb3a891fae14c7e9d4b685de6.tar.gz frameworks_av-f6d0c1fd6d9e697bb3a891fae14c7e9d4b685de6.tar.bz2 |
libstagefright: fix 64-bit warnings
%lld -> %" PRId64 " for int64_t
%d -> %zu for size_t
Also fixes some casts from void* to integer types, and some comparisons
between signed and unsigned.
(cherry picked from commit b4a7a2df4c28c3f32b5d877b54831d2cc5d78f81)
Change-Id: I76ba94d0b67776fd7abdc83b43d47c61d6c32f4c
Diffstat (limited to 'media/libstagefright/httplive')
-rw-r--r-- | media/libstagefright/httplive/LiveSession.cpp | 9 | ||||
-rw-r--r-- | media/libstagefright/httplive/PlaylistFetcher.cpp | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index bdf5787..033d981 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -38,6 +38,7 @@ #include <media/stagefright/Utils.h> #include <ctype.h> +#include <inttypes.h> #include <openssl/aes.h> #include <openssl/md5.h> @@ -126,7 +127,7 @@ status_t LiveSession::dequeueAccessUnit( if (stream == STREAMTYPE_AUDIO || stream == STREAMTYPE_VIDEO) { int64_t timeUs; CHECK((*accessUnit)->meta()->findInt64("timeUs", &timeUs)); - ALOGV("[%s] read buffer at time %lld us", streamStr, timeUs); + ALOGV("[%s] read buffer at time %" PRId64 " us", streamStr, timeUs); mLastDequeuedTimeUs = timeUs; mRealTimeBaseUs = ALooper::GetNowUs() - timeUs; @@ -562,7 +563,7 @@ status_t LiveSession::fetchFile( if (bufferRemaining == 0) { bufferRemaining = 32768; - ALOGV("increasing download buffer to %d bytes", + ALOGV("increasing download buffer to %zu bytes", buffer->size() + bufferRemaining); sp<ABuffer> copy = new ABuffer(buffer->size() + bufferRemaining); @@ -575,7 +576,7 @@ status_t LiveSession::fetchFile( size_t maxBytesToRead = bufferRemaining; if (range_length >= 0) { int64_t bytesLeftInRange = range_length - buffer->size(); - if (bytesLeftInRange < maxBytesToRead) { + if (bytesLeftInRange < (int64_t)maxBytesToRead) { maxBytesToRead = bytesLeftInRange; if (bytesLeftInRange == 0) { @@ -822,7 +823,7 @@ void LiveSession::changeConfiguration( mPrevBandwidthIndex = bandwidthIndex; - ALOGV("changeConfiguration => timeUs:%lld us, bwIndex:%d, pickTrack:%d", + ALOGV("changeConfiguration => timeUs:%" PRId64 " us, bwIndex:%zu, pickTrack:%d", timeUs, bandwidthIndex, pickTrack); if (pickTrack) { diff --git a/media/libstagefright/httplive/PlaylistFetcher.cpp b/media/libstagefright/httplive/PlaylistFetcher.cpp index 973b779..57bf7db 100644 --- a/media/libstagefright/httplive/PlaylistFetcher.cpp +++ b/media/libstagefright/httplive/PlaylistFetcher.cpp @@ -40,6 +40,7 @@ #include <media/stagefright/Utils.h> #include <ctype.h> +#include <inttypes.h> #include <openssl/aes.h> #include <openssl/md5.h> @@ -587,7 +588,7 @@ void PlaylistFetcher::onDownloadNext() { ALOGE("Cannot find sequence number %d in playlist " "(contains %d - %d)", mSeqNumber, firstSeqNumberInPlaylist, - firstSeqNumberInPlaylist + mPlaylist->size() - 1); + firstSeqNumberInPlaylist + (int32_t)mPlaylist->size() - 1); notifyError(ERROR_END_OF_STREAM); return; |