summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorRobert Shih <robertshih@google.com>2014-08-28 22:57:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-28 22:57:40 +0000
commit6868628c0df9b8dfa0a1c16be109d907384e3186 (patch)
tree3673c5111e25b7c68a6348d3cf185753a6147165 /media
parent8962e08c4989368d2c821b64f42632b6f5fb016e (diff)
parent39f5874c4040bec6fdbf0c0912daffcb10010df8 (diff)
downloadframeworks_av-6868628c0df9b8dfa0a1c16be109d907384e3186.zip
frameworks_av-6868628c0df9b8dfa0a1c16be109d907384e3186.tar.gz
frameworks_av-6868628c0df9b8dfa0a1c16be109d907384e3186.tar.bz2
Merge "PlaylistFetcher: add lower bound check when starting live streams" into lmp-dev
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/httplive/PlaylistFetcher.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libstagefright/httplive/PlaylistFetcher.cpp b/media/libstagefright/httplive/PlaylistFetcher.cpp
index 80cb2d0..4d5d79e 100644
--- a/media/libstagefright/httplive/PlaylistFetcher.cpp
+++ b/media/libstagefright/httplive/PlaylistFetcher.cpp
@@ -754,6 +754,9 @@ void PlaylistFetcher::onDownloadNext() {
if (!mPlaylist->isComplete() && !mPlaylist->isEvent()) {
// If this is a live session, start 3 segments from the end on connect
mSeqNumber = lastSeqNumberInPlaylist - 3;
+ if (mSeqNumber < firstSeqNumberInPlaylist) {
+ mSeqNumber = firstSeqNumberInPlaylist;
+ }
} else {
mSeqNumber = getSeqNumberForTime(mStartTimeUs);
mStartTimeUs -= getSegmentStartTimeUs(mSeqNumber);