summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MPEG4Writer.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2013-01-30 18:45:30 +0200
committerMartin Storsjo <martin@martin.st>2013-01-31 11:22:35 +0200
commit89b28bfea641983a908b45a15e69a6c62add847a (patch)
treeea05257bdb2bb61e291b376ebce5fe97af74c069 /media/libstagefright/MPEG4Writer.cpp
parent2cd9cc25f07a9270a932fdf9c7b52c398e07bce5 (diff)
downloadframeworks_av-89b28bfea641983a908b45a15e69a6c62add847a.zip
frameworks_av-89b28bfea641983a908b45a15e69a6c62add847a.tar.gz
frameworks_av-89b28bfea641983a908b45a15e69a6c62add847a.tar.bz2
MPEG4Writer: Write a zero-length compressor string
The first byte is the number of bytes in the string to display, the rest is the actual string (see ISO/IEC 14496-12:2008 page 29, compressorname in VisualSampleEntry) to display. Currently, all 31 space characters are displayed in certain players (such as Apple QuickTime Player) instead of the plain codec name (e.g. "H.264"). By writing the string length properly, the actual content of the remaining 31 bytes is ignored instead of displayed. Change-Id: I7f93a8966d74a4e86abc46c3dcb70f71780d9cd6
Diffstat (limited to 'media/libstagefright/MPEG4Writer.cpp')
-rwxr-xr-xmedia/libstagefright/MPEG4Writer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index 8b52e15..326930f 100755
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -2558,7 +2558,8 @@ void MPEG4Writer::Track::writeVideoFourCCBox() {
mOwner->writeInt32(0x480000); // vert resolution
mOwner->writeInt32(0); // reserved
mOwner->writeInt16(1); // frame count
- mOwner->write(" ", 32);
+ mOwner->writeInt8(0); // compressor string length
+ mOwner->write(" ", 31);
mOwner->writeInt16(0x18); // depth
mOwner->writeInt16(-1); // predefined