diff options
author | Andreas Huber <andih@google.com> | 2010-08-18 10:17:18 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-08-18 10:17:18 -0700 |
commit | ef7af7fec702db2fde72b16dedf9064585e6db77 (patch) | |
tree | ecc3cad303e91e61d716d829ef3cbdab181625f8 /media/libstagefright/rtsp/ASessionDescription.cpp | |
parent | c059860c73678a202bfa33062723e8f82fb779d9 (diff) | |
download | frameworks_av-ef7af7fec702db2fde72b16dedf9064585e6db77.zip frameworks_av-ef7af7fec702db2fde72b16dedf9064585e6db77.tar.gz frameworks_av-ef7af7fec702db2fde72b16dedf9064585e6db77.tar.bz2 |
Better support for rtsp streamed through VLC. Temporarily make the socket blocking to read all of the session description.
Change-Id: Ibe71f5941485660510e24d714da3865b9c6f89a2
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 ad813cd..4ea7fda 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 { |