summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2014-06-26 13:03:47 -0700
committerChong Zhang <chz@google.com>2014-06-26 16:30:00 -0700
commit632740c58119a132ce19f6d498e39c5c3773971a (patch)
tree834b867457d9f538f452e58c2372d791668befa5 /media/libmediaplayerservice/nuplayer
parente8f2c6cfe9afc5b303ab6b0fb51e18ddce512b54 (diff)
downloadframeworks_av-632740c58119a132ce19f6d498e39c5c3773971a.zip
frameworks_av-632740c58119a132ce19f6d498e39c5c3773971a.tar.gz
frameworks_av-632740c58119a132ce19f6d498e39c5c3773971a.tar.bz2
HLS: do not discard packets when queuing explicit discontinuity
in case of explicit discontinuity (#EXT-X-DISCONTINUITY tag in the playlist), do not discard packets that's already queued. (when seeking, the old fetcher will be discarded so this won't affect seeking case.) Bug: 15020526 Change-Id: I5d3fc489df35e3bc44acb1ee7851571cb99cb56b
Diffstat (limited to 'media/libmediaplayerservice/nuplayer')
-rw-r--r--media/libmediaplayerservice/nuplayer/GenericSource.cpp8
-rw-r--r--media/libmediaplayerservice/nuplayer/RTSPSource.cpp5
2 files changed, 10 insertions, 3 deletions
diff --git a/media/libmediaplayerservice/nuplayer/GenericSource.cpp b/media/libmediaplayerservice/nuplayer/GenericSource.cpp
index 5cf9238..388f77a 100644
--- a/media/libmediaplayerservice/nuplayer/GenericSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/GenericSource.cpp
@@ -272,7 +272,9 @@ void NuPlayer::GenericSource::readBuffer(
if (seeking) {
track->mPackets->queueDiscontinuity(
- ATSParser::DISCONTINUITY_SEEK, NULL);
+ ATSParser::DISCONTINUITY_SEEK,
+ NULL,
+ true /* discard */);
}
track->mPackets->queueAccessUnit(buffer);
@@ -280,7 +282,9 @@ void NuPlayer::GenericSource::readBuffer(
} else if (err == INFO_FORMAT_CHANGED) {
#if 0
track->mPackets->queueDiscontinuity(
- ATSParser::DISCONTINUITY_FORMATCHANGE, NULL);
+ ATSParser::DISCONTINUITY_FORMATCHANGE,
+ NULL,
+ false /* discard */);
#endif
} else {
track->mPackets->signalEOS(err);
diff --git a/media/libmediaplayerservice/nuplayer/RTSPSource.cpp b/media/libmediaplayerservice/nuplayer/RTSPSource.cpp
index 94800ba..2338b23 100644
--- a/media/libmediaplayerservice/nuplayer/RTSPSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/RTSPSource.cpp
@@ -505,7 +505,10 @@ void NuPlayer::RTSPSource::onMessageReceived(const sp<AMessage> &msg) {
TrackInfo *info = &mTracks.editItemAt(trackIndex);
sp<AnotherPacketSource> source = info->mSource;
if (source != NULL) {
- source->queueDiscontinuity(ATSParser::DISCONTINUITY_SEEK, NULL);
+ source->queueDiscontinuity(
+ ATSParser::DISCONTINUITY_SEEK,
+ NULL,
+ true /* discard */);
}
break;