summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/matroska/MatroskaExtractor.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/matroska/MatroskaExtractor.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/matroska/MatroskaExtractor.cpp')
-rw-r--r--media/libstagefright/matroska/MatroskaExtractor.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp
index 6ec9263..d4a7c7f 100644
--- a/media/libstagefright/matroska/MatroskaExtractor.cpp
+++ b/media/libstagefright/matroska/MatroskaExtractor.cpp
@@ -33,6 +33,8 @@
#include <media/stagefright/Utils.h>
#include <utils/String8.h>
+#include <inttypes.h>
+
namespace android {
struct DataSourceReader : public mkvparser::IMkvReader {
@@ -103,7 +105,7 @@ struct BlockIterator {
private:
MatroskaExtractor *mExtractor;
- unsigned long mTrackNum;
+ long long mTrackNum;
const mkvparser::Cluster *mCluster;
const mkvparser::BlockEntry *mBlockEntry;
@@ -183,7 +185,7 @@ MatroskaSource::MatroskaSource(
CHECK_GE(avccSize, 5u);
mNALSizeLen = 1 + (avcc[4] & 3);
- ALOGV("mNALSizeLen = %d", mNALSizeLen);
+ ALOGV("mNALSizeLen = %zu", mNALSizeLen);
} else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC)) {
mType = AAC;
}
@@ -320,7 +322,7 @@ void BlockIterator::seek(
// Special case the 0 seek to avoid loading Cues when the application
// extraneously seeks to 0 before playing.
if (seekTimeNs <= 0) {
- ALOGV("Seek to beginning: %lld", seekTimeUs);
+ ALOGV("Seek to beginning: %" PRId64, seekTimeUs);
mCluster = pSegment->GetFirst();
mBlockEntryIndex = 0;
do {
@@ -329,7 +331,7 @@ void BlockIterator::seek(
return;
}
- ALOGV("Seeking to: %lld", seekTimeUs);
+ ALOGV("Seeking to: %" PRId64, seekTimeUs);
// If the Cues have not been located then find them.
const mkvparser::Cues* pCues = pSegment->GetCues();
@@ -378,7 +380,7 @@ void BlockIterator::seek(
for (size_t index = 0; index < pTracks->GetTracksCount(); ++index) {
pTrack = pTracks->GetTrackByIndex(index);
if (pTrack && pTrack->GetType() == 1) { // VIDEO_TRACK
- ALOGV("Video track located at %d", index);
+ ALOGV("Video track located at %zu", index);
break;
}
}
@@ -409,7 +411,7 @@ void BlockIterator::seek(
if (isAudio || block()->IsKey()) {
// Accept the first key frame
*actualFrameTimeUs = (block()->GetTime(mCluster) + 500LL) / 1000LL;
- ALOGV("Requested seek point: %lld actual: %lld",
+ ALOGV("Requested seek point: %" PRId64 " actual: %" PRId64,
seekTimeUs, *actualFrameTimeUs);
break;
}