diff options
author | Robert Shih <robertshih@google.com> | 2014-09-15 13:36:30 -0700 |
---|---|---|
committer | Robert Shih <robertshih@google.com> | 2014-09-17 18:57:54 +0000 |
commit | 15f8ecfa23b650b3efa8fe841d2be6bd0c9523fb (patch) | |
tree | 44aeb363db40cecfabf617bc84032751721c1cf9 | |
parent | 90869c2bef1bc47394a9f603ccebb62b2592fd2b (diff) | |
download | frameworks_av-15f8ecfa23b650b3efa8fe841d2be6bd0c9523fb.zip frameworks_av-15f8ecfa23b650b3efa8fe841d2be6bd0c9523fb.tar.gz frameworks_av-15f8ecfa23b650b3efa8fe841d2be6bd0c9523fb.tar.bz2 |
PlaylistFetcher:don't signal a/v eos on subttitle eos
Bug: 17310061
Change-Id: Ifbca3c12f21171a6e429dca51a250a41051fdd34
-rw-r--r-- | media/libstagefright/httplive/LiveSession.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index 7786c27..b465566 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -443,6 +443,23 @@ void LiveSession::onMessageReceived(const sp<AMessage> &msg) { ALOGE("XXX Received error %d from PlaylistFetcher.", err); + // handle EOS on subtitle tracks independently + AString uri; + if (err == ERROR_END_OF_STREAM && msg->findString("uri", &uri)) { + ssize_t i = mFetcherInfos.indexOfKey(uri); + if (i >= 0) { + const sp<PlaylistFetcher> &fetcher = mFetcherInfos.valueAt(i).mFetcher; + if (fetcher != NULL) { + uint32_t type = fetcher->getStreamTypeMask(); + if (type == STREAMTYPE_SUBTITLES) { + mPacketSources.valueFor( + STREAMTYPE_SUBTITLES)->signalEOS(err);; + break; + } + } + } + } + if (mInPreparationPhase) { postPrepared(err); } |