summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MPEG4Writer.cpp
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-05-13 14:41:21 -0700
committerJames Dong <jdong@google.com>2011-05-13 14:41:21 -0700
commitb5212db69734962f55e1493d3e696794172ced51 (patch)
tree0faff9febe304608a2c1a1e08d47139073a86348 /media/libstagefright/MPEG4Writer.cpp
parent6b25afcd9df2f1f0cc3ae03bf133f75464910560 (diff)
downloadframeworks_av-b5212db69734962f55e1493d3e696794172ced51.zip
frameworks_av-b5212db69734962f55e1493d3e696794172ced51.tar.gz
frameworks_av-b5212db69734962f55e1493d3e696794172ced51.tar.bz2
Track id really starts with 1, not 0
Change-Id: I55dcfdc2dc2a64285dfa93024f7b885210cc827e
Diffstat (limited to 'media/libstagefright/MPEG4Writer.cpp')
-rw-r--r--media/libstagefright/MPEG4Writer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index fd60f06..fdd2f68 100644
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -2491,7 +2491,7 @@ void MPEG4Writer::Track::writeTkhdBox(time_t now) {
mOwner->writeInt32(0x07); // version=0, flags=7
mOwner->writeInt32(now); // creation time
mOwner->writeInt32(now); // modification time
- mOwner->writeInt32(mTrackId);
+ mOwner->writeInt32(mTrackId + 1); // track id starts with 1
mOwner->writeInt32(0); // reserved
int64_t trakDurationUs = getDurationUs();
int32_t mvhdTimeScale = mOwner->getTimeScale();