diff options
author | Robert Shih <robertshih@google.com> | 2015-02-04 21:18:33 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-02-04 21:18:34 +0000 |
commit | 6fbcf6331abfbbc935bf89332f84303733e578b2 (patch) | |
tree | df0f06ceb047ecdb6f8d1d1f6ddc271656ae37b9 /media/libstagefright/httplive/LiveSession.cpp | |
parent | 57f75272fcd16b205ed60cdd0b33ffc19991fd10 (diff) | |
parent | afcc4fcbb3a094ec2221d6e523772e76894d1f00 (diff) | |
download | frameworks_av-6fbcf6331abfbbc935bf89332f84303733e578b2.zip frameworks_av-6fbcf6331abfbbc935bf89332f84303733e578b2.tar.gz frameworks_av-6fbcf6331abfbbc935bf89332f84303733e578b2.tar.bz2 |
Merge "httplive: Set start time and segment start time in conjunction." into lmp-mr1-dev
Diffstat (limited to 'media/libstagefright/httplive/LiveSession.cpp')
-rw-r--r-- | media/libstagefright/httplive/LiveSession.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index 2c1fbb4..4355a3c 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -1509,14 +1509,15 @@ void LiveSession::onChangeConfiguration3(const sp<AMessage> &msg) { if (meta != NULL && !meta->findInt32("discontinuity", &type)) { int64_t tmpUs; + int64_t tmpSegmentUs; + CHECK(meta->findInt64("timeUs", &tmpUs)); - if (startTimeUs < 0 || tmpUs < startTimeUs) { + CHECK(meta->findInt64("segmentStartTimeUs", &tmpSegmentUs)); + if (startTimeUs < 0 || tmpSegmentUs < segmentStartTimeUs) { + startTimeUs = tmpUs; + segmentStartTimeUs = tmpSegmentUs; + } else if (tmpSegmentUs == segmentStartTimeUs && tmpUs < startTimeUs) { startTimeUs = tmpUs; - } - - CHECK(meta->findInt64("segmentStartTimeUs", &tmpUs)); - if (segmentStartTimeUs < 0 || tmpUs < segmentStartTimeUs) { - segmentStartTimeUs = tmpUs; } int32_t seq; |