summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/httplive
diff options
context:
space:
mode:
authorRobert Shih <robertshih@google.com>2015-05-11 18:35:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-11 18:35:37 +0000
commita540058ec00b6d147f40a7cdcf6f47acbd70f6c9 (patch)
treeedb283551cedb1823b222dc89fe6deff05ec0f04 /media/libstagefright/httplive
parent804a77d1045c6c4023f73a0975a09025b2e8eef2 (diff)
parentaabbdc7401ae24a4199f12a283985deb648673c0 (diff)
downloadframeworks_av-a540058ec00b6d147f40a7cdcf6f47acbd70f6c9.zip
frameworks_av-a540058ec00b6d147f40a7cdcf6f47acbd70f6c9.tar.gz
frameworks_av-a540058ec00b6d147f40a7cdcf6f47acbd70f6c9.tar.bz2
Merge "HLS: invoke signalEOS on ATSParser to flush out final samples" into mnc-dev
Diffstat (limited to 'media/libstagefright/httplive')
-rw-r--r--media/libstagefright/httplive/PlaylistFetcher.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libstagefright/httplive/PlaylistFetcher.cpp b/media/libstagefright/httplive/PlaylistFetcher.cpp
index 5a0deec..4851528 100644
--- a/media/libstagefright/httplive/PlaylistFetcher.cpp
+++ b/media/libstagefright/httplive/PlaylistFetcher.cpp
@@ -1082,6 +1082,16 @@ bool PlaylistFetcher::initDownloadState(
mSeqNumber, firstSeqNumberInPlaylist,
firstSeqNumberInPlaylist + (int32_t)mPlaylist->size() - 1);
+ if (mTSParser != NULL) {
+ mTSParser->signalEOS(ERROR_END_OF_STREAM);
+ // Use an empty buffer; we don't have any new data, just want to extract
+ // potential new access units after flush. Reset mSeqNumber to
+ // lastSeqNumberInPlaylist such that we set the correct access unit
+ // properties in extractAndQueueAccessUnitsFromTs.
+ sp<ABuffer> buffer = new ABuffer(0);
+ mSeqNumber = lastSeqNumberInPlaylist;
+ extractAndQueueAccessUnitsFromTs(buffer);
+ }
notifyError(ERROR_END_OF_STREAM);
} else {
// It's possible that we were never able to download the playlist.