summaryrefslogtreecommitdiff
path: root/media/libstagefright
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
commitc30a88a273b47bef6728ae1dddea11641090939a (patch)
tree10166c7cc56d4479b37c1fb3b8cd509699dcd5bc /media/libstagefright
parent12834fe289e8173e94f31603fa6d313abe56ad70 (diff)
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')
-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 8b52e15d..326930f5 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