diff options
author | Andreas Huber <andih@google.com> | 2011-06-23 10:12:22 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-06-23 10:12:22 -0700 |
commit | 5ecc4601ea2672e1e52bcd0860908d1cae7db4c2 (patch) | |
tree | b9777fc0b2b14cab0ac3a3baff300f33a21e7556 /media | |
parent | 16b501ae0934ac226256d1f0c065db1285c2db84 (diff) | |
parent | d873413ff9f742f259c29d7d0b58265db6b24529 (diff) | |
download | frameworks_base-5ecc4601ea2672e1e52bcd0860908d1cae7db4c2.zip frameworks_base-5ecc4601ea2672e1e52bcd0860908d1cae7db4c2.tar.gz frameworks_base-5ecc4601ea2672e1e52bcd0860908d1cae7db4c2.tar.bz2 |
Merge "Parse RTP-Info even for live streams."
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/rtsp/ASessionDescription.cpp | 3 | ||||
-rw-r--r-- | media/libstagefright/rtsp/MyHandler.h | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/media/libstagefright/rtsp/ASessionDescription.cpp b/media/libstagefright/rtsp/ASessionDescription.cpp index f03f7a2..fd0505e 100644 --- a/media/libstagefright/rtsp/ASessionDescription.cpp +++ b/media/libstagefright/rtsp/ASessionDescription.cpp @@ -301,6 +301,9 @@ void ASessionDescription::ParseFormatDesc( // static bool ASessionDescription::parseNTPRange( const char *s, float *npt1, float *npt2) { + *npt1 = 0.0f; + *npt2 = 0.0f; + if (s[0] == '-') { return false; // no start time available. } diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h index d15d9c5..f89f8e2 100644 --- a/media/libstagefright/rtsp/MyHandler.h +++ b/media/libstagefright/rtsp/MyHandler.h @@ -995,10 +995,12 @@ struct MyHandler : public AHandler { AString val; CHECK(GetAttribute(range.c_str(), "npt", &val)); + bool seekable = true; + float npt1, npt2; if (!ASessionDescription::parseNTPRange(val.c_str(), &npt1, &npt2)) { // This is a live stream and therefore not seekable. - return; + seekable = false; } i = response->mHeaders.indexOfKey("rtp-info"); @@ -1044,7 +1046,7 @@ struct MyHandler : public AHandler { ++n; } - mSeekable = true; + mSeekable = seekable; } sp<APacketSource> getPacketSource(size_t index) { |