From 89b28bfea641983a908b45a15e69a6c62add847a Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Wed, 30 Jan 2013 18:45:30 +0200 Subject: 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 --- media/libstagefright/MPEG4Writer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'media/libstagefright/MPEG4Writer.cpp') 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 -- cgit v1.1