From 1bc76127afee16c851a100370d4bb2987e94b362 Mon Sep 17 00:00:00 2001 From: Insun Kang Date: Thu, 10 Nov 2011 16:11:26 +0900 Subject: [PATCH] Adds handler type 'sbtl' to support subtitles in various containers. Change-Id: I16d2c5d9aeb087b958e28052f266ca0ef42ea7f1 --- media/libstagefright/MPEG4Extractor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp index adec997498a89..1b286fa6d33fc 100644 --- a/media/libstagefright/MPEG4Extractor.cpp +++ b/media/libstagefright/MPEG4Extractor.cpp @@ -1336,8 +1336,9 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { uint32_t type = ntohl(buffer); // For the 3GPP file format, the handler-type within the 'hdlr' box - // shall be 'text' - if (type == FOURCC('t', 'e', 'x', 't')) { + // shall be 'text'. We also want to support 'sbtl' handler type + // for a practical reason as various MPEG4 containers use it. + if (type == FOURCC('t', 'e', 'x', 't') || type == FOURCC('s', 'b', 't', 'l')) { mLastTrack->meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_TEXT_3GPP); }