diff options
author | Andreas Huber <andih@google.com> | 2010-08-21 09:40:57 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-08-21 09:40:57 -0700 |
commit | 91d113e8daa9d71c4ea8afd595a3921e03787cbf (patch) | |
tree | fea830e50f39e59aaef2e5935bbb86a708d027d8 /media/libstagefright/rtsp/ASessionDescription.cpp | |
parent | 69e0b8c5556df1d4db1a730db1c13409a96749c7 (diff) | |
parent | b9b08ff55456fe845cb4c64500e9cb53682e202f (diff) | |
download | frameworks_av-91d113e8daa9d71c4ea8afd595a3921e03787cbf.zip frameworks_av-91d113e8daa9d71c4ea8afd595a3921e03787cbf.tar.gz frameworks_av-91d113e8daa9d71c4ea8afd595a3921e03787cbf.tar.bz2 |
am 6bcffcd2: am 8c192fe9: Merge "Better support for rtsp streamed through VLC. Temporarily make the socket blocking to read all of the session description." into gingerbread
Merge commit '6bcffcd2dc410db780c152c70a01b22da6ca58be'
* commit '6bcffcd2dc410db780c152c70a01b22da6ca58be':
Better support for rtsp streamed through VLC. Temporarily make the socket blocking to read all of the session description.
Diffstat (limited to 'media/libstagefright/rtsp/ASessionDescription.cpp')
-rw-r--r-- | media/libstagefright/rtsp/ASessionDescription.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/media/libstagefright/rtsp/ASessionDescription.cpp b/media/libstagefright/rtsp/ASessionDescription.cpp index 8187e0c..4a8cce8 100644 --- a/media/libstagefright/rtsp/ASessionDescription.cpp +++ b/media/libstagefright/rtsp/ASessionDescription.cpp @@ -203,13 +203,18 @@ void ASessionDescription::getFormatType( } } -void ASessionDescription::getDimensions( +bool ASessionDescription::getDimensions( size_t index, unsigned long PT, int32_t *width, int32_t *height) const { + *width = 0; + *height = 0; + char key[20]; sprintf(key, "a=framesize:%lu", PT); AString value; - CHECK(findAttribute(index, key, &value)); + if (!findAttribute(index, key, &value)) { + return false; + } const char *s = value.c_str(); char *end; @@ -221,6 +226,8 @@ void ASessionDescription::getDimensions( *height = strtoul(s, &end, 10); CHECK_GT(end, s); CHECK_EQ(*end, '\0'); + + return true; } bool ASessionDescription::getDurationUs(int64_t *durationUs) const { |