From 9f434cfd021f60e26baf589dc34bf3839b832d4d Mon Sep 17 00:00:00 2001 From: Robert Shih Date: Mon, 10 Mar 2014 17:05:01 -0700 Subject: M3UParser: trim spaces when parsing comma separated codecs. Bug: 13402087 Change-Id: Idc92716bfefd6d1b0cb371d0d97d990d53288090 --- media/libstagefright/httplive/M3UParser.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'media/libstagefright/httplive') diff --git a/media/libstagefright/httplive/M3UParser.cpp b/media/libstagefright/httplive/M3UParser.cpp index 8f530ee..f211bc8 100644 --- a/media/libstagefright/httplive/M3UParser.cpp +++ b/media/libstagefright/httplive/M3UParser.cpp @@ -365,6 +365,7 @@ bool M3UParser::getTypeURI(size_t index, const char *key, AString *uri) const { codecs.append(','); while ((commaPos = codecs.find(",", offset)) >= 0) { AString codec(codecs, offset, commaPos - offset); + codec.trim(); // return true only if a codec of type `key` ("audio"/"video") // is found. if (codecIsType(codec, key)) { -- cgit v1.1 From 7d3044d64294cca6fadd184648a57185e92cf5c6 Mon Sep 17 00:00:00 2001 From: Robert Shih Date: Mon, 10 Mar 2014 17:27:15 -0700 Subject: LiveSession: fix incorrect stream key (subtitle"s") Bug: 13402087 Change-Id: Ic46e3069c6e41f90ead47cae84cbe0123d11002a --- media/libstagefright/httplive/LiveSession.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media/libstagefright/httplive') diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index c1c3e2b..3e11759 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -75,7 +75,7 @@ LiveSession::LiveSession( mStreams[kAudioIndex] = StreamItem("audio"); mStreams[kVideoIndex] = StreamItem("video"); - mStreams[kSubtitleIndex] = StreamItem("subtitle"); + mStreams[kSubtitleIndex] = StreamItem("subtitles"); for (size_t i = 0; i < kMaxStreams; ++i) { mPacketSources.add(indexToType(i), new AnotherPacketSource(NULL /* meta */)); -- cgit v1.1