summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-04-09 21:47:22 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-09 21:47:22 +0000
commitbd903e363faeacaeae98252bfc753d5cac9de602 (patch)
treed3187d148fe37a557a3a4c3d4b2c568e584ba69f /media/libstagefright
parent9db4d29fe4b113a63f0c1701a067d044c8c596f6 (diff)
parenta1151185c7eb3b4c483f7067deba1775fd0a2510 (diff)
downloadframeworks_av-bd903e363faeacaeae98252bfc753d5cac9de602.zip
frameworks_av-bd903e363faeacaeae98252bfc753d5cac9de602.tar.gz
frameworks_av-bd903e363faeacaeae98252bfc753d5cac9de602.tar.bz2
Merge "stagefright: LiveSession: delay consuming reply ID for seek"
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/httplive/LiveSession.cpp25
-rw-r--r--media/libstagefright/httplive/LiveSession.h2
2 files changed, 10 insertions, 17 deletions
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp
index f7a4a0d..26f8da1 100644
--- a/media/libstagefright/httplive/LiveSession.cpp
+++ b/media/libstagefright/httplive/LiveSession.cpp
@@ -498,16 +498,15 @@ void LiveSession::onMessageReceived(const sp<AMessage> &msg) {
case kWhatSeek:
{
- sp<AReplyToken> seekReplyID;
- CHECK(msg->senderAwaitsResponse(&seekReplyID));
- mSeekReplyID = seekReplyID;
- mSeekReply = new AMessage;
-
- status_t err = onSeek(msg);
-
- if (err != OK) {
+ if (mReconfigurationInProgress) {
msg->post(50000);
+ break;
}
+
+ CHECK(msg->senderAwaitsResponse(&mSeekReplyID));
+ mSeekReply = new AMessage;
+
+ onSeek(msg);
break;
}
@@ -1372,16 +1371,10 @@ HLSTime LiveSession::latestMediaSegmentStartTime() const {
return audioTime < videoTime ? videoTime : audioTime;
}
-status_t LiveSession::onSeek(const sp<AMessage> &msg) {
+void LiveSession::onSeek(const sp<AMessage> &msg) {
int64_t timeUs;
CHECK(msg->findInt64("timeUs", &timeUs));
-
- if (!mReconfigurationInProgress) {
- changeConfiguration(timeUs);
- return OK;
- } else {
- return -EWOULDBLOCK;
- }
+ changeConfiguration(timeUs);
}
status_t LiveSession::getDuration(int64_t *durationUs) const {
diff --git a/media/libstagefright/httplive/LiveSession.h b/media/libstagefright/httplive/LiveSession.h
index e4f1b97..c587f40 100644
--- a/media/libstagefright/httplive/LiveSession.h
+++ b/media/libstagefright/httplive/LiveSession.h
@@ -237,7 +237,7 @@ private:
sp<PlaylistFetcher> addFetcher(const char *uri);
void onConnect(const sp<AMessage> &msg);
- status_t onSeek(const sp<AMessage> &msg);
+ void onSeek(const sp<AMessage> &msg);
void onFinishDisconnect2();
// If given a non-zero block_size (default 0), it is used to cap the number of