diff options
author | Andreas Huber <andih@google.com> | 2011-07-13 09:36:11 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2011-07-13 09:47:09 -0700 |
commit | 42e549e4ab54802d788c43e3a04a85b7a1a95e97 (patch) | |
tree | 6bf620f639533f345089df3902a93109028bed4e /media/libmediaplayerservice/nuplayer/StreamingSource.cpp | |
parent | 9cded98816c40fd55053b1e38fc7fd8a68da8866 (diff) | |
download | frameworks_av-42e549e4ab54802d788c43e3a04a85b7a1a95e97.zip frameworks_av-42e549e4ab54802d788c43e3a04a85b7a1a95e97.tar.gz frameworks_av-42e549e4ab54802d788c43e3a04a85b7a1a95e97.tar.bz2 |
Enable signalling of a stream discontinuity involving a format-change
through IStreamListener.
Change-Id: Ic0409cdc4891ad26b61f2f98bdda3c7fb2e2de6a
related-to-bug: 5022434
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/StreamingSource.cpp')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/StreamingSource.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp index bbc8a6e..a6a3a18 100644 --- a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp +++ b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp @@ -63,8 +63,17 @@ bool NuPlayer::StreamingSource::feedMoreTSData() { mEOS = true; break; } else if (n == INFO_DISCONTINUITY) { - mTSParser->signalDiscontinuity( - ATSParser::DISCONTINUITY_SEEK, extra); + ATSParser::DiscontinuityType type = ATSParser::DISCONTINUITY_SEEK; + + int32_t formatChange; + if (extra != NULL + && extra->findInt32( + IStreamListener::kKeyFormatChange, &formatChange) + && formatChange != 0) { + type = ATSParser::DISCONTINUITY_FORMATCHANGE; + } + + mTSParser->signalDiscontinuity(type, extra); } else if (n < 0) { CHECK_EQ(n, -EWOULDBLOCK); break; |