summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2014-03-19 16:59:00 -0700
committerColin Cross <ccross@android.com>2014-03-19 17:00:58 -0700
commitb4a7a2df4c28c3f32b5d877b54831d2cc5d78f81 (patch)
treee4b01823fbfbd71ae3f548e78cfbf21d0d988ad3 /media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp
parentd4a31b8bcd7df99dfce2f25a32badf4611a6ba1a (diff)
downloadframeworks_av-b4a7a2df4c28c3f32b5d877b54831d2cc5d78f81.zip
frameworks_av-b4a7a2df4c28c3f32b5d877b54831d2cc5d78f81.tar.gz
frameworks_av-b4a7a2df4c28c3f32b5d877b54831d2cc5d78f81.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. Change-Id: I9c52f76240e39399da252c66459042a6fc626a90
Diffstat (limited to 'media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp')
-rw-r--r--media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp b/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp
index 40661e7..0c62ec0 100644
--- a/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp
+++ b/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp
@@ -247,7 +247,7 @@ OMX_ERRORTYPE SoftFlacEncoder::internalSetParameter(
if (defParams->nPortIndex == 0) {
if (defParams->nBufferSize > kMaxInputBufferSize) {
- ALOGE("Input buffer size must be at most %zu bytes",
+ ALOGE("Input buffer size must be at most %d bytes",
kMaxInputBufferSize);
return OMX_ErrorUnsupportedSetting;
}
@@ -354,12 +354,12 @@ FLAC__StreamEncoderWriteStatus SoftFlacEncoder::onEncodedFlacAvailable(
size_t bytes, unsigned samples,
unsigned current_frame) {
UNUSED_UNLESS_VERBOSE(current_frame);
- ALOGV("SoftFlacEncoder::onEncodedFlacAvailable(bytes=%d, samples=%d, curr_frame=%d)",
+ ALOGV("SoftFlacEncoder::onEncodedFlacAvailable(bytes=%zu, samples=%u, curr_frame=%u)",
bytes, samples, current_frame);
#ifdef WRITE_FLAC_HEADER_IN_FIRST_BUFFER
if (samples == 0) {
- ALOGI(" saving %d bytes of header", bytes);
+ ALOGI(" saving %zu bytes of header", bytes);
memcpy(mHeader + mHeaderOffset, buffer, bytes);
mHeaderOffset += bytes;// will contain header size when finished receiving header
return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
@@ -370,7 +370,7 @@ FLAC__StreamEncoderWriteStatus SoftFlacEncoder::onEncodedFlacAvailable(
if ((samples == 0) || !mEncoderWriteData) {
// called by the encoder because there's header data to save, but it's not the role
// of this component (unless WRITE_FLAC_HEADER_IN_FIRST_BUFFER is defined)
- ALOGV("ignoring %d bytes of header data (samples=%d)", bytes, samples);
+ ALOGV("ignoring %zu bytes of header data (samples=%d)", bytes, samples);
return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
}
@@ -391,9 +391,9 @@ FLAC__StreamEncoderWriteStatus SoftFlacEncoder::onEncodedFlacAvailable(
#endif
// write encoded data
- ALOGV(" writing %d bytes of encoded data on output port", bytes);
+ ALOGV(" writing %zu bytes of encoded data on output port", bytes);
if (bytes > outHeader->nAllocLen - outHeader->nOffset - outHeader->nFilledLen) {
- ALOGE(" not enough space left to write encoded data, dropping %u bytes", bytes);
+ ALOGE(" not enough space left to write encoded data, dropping %zu bytes", bytes);
// a fatal error would stop the encoding
return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
}