diff options
author | Andreas Huber <andih@google.com> | 2011-02-15 10:39:48 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2011-02-15 12:00:07 -0800 |
commit | dc468c5f9d72ce54de0070493e9a23efb8907e06 (patch) | |
tree | 60bc0bbce4d9d765f13235d702443fecbe7e03ea /media/libstagefright/rtsp/ASessionDescription.cpp | |
parent | f1958f9442bc937e1f8c8d9175901500b944b021 (diff) | |
download | frameworks_av-dc468c5f9d72ce54de0070493e9a23efb8907e06.zip frameworks_av-dc468c5f9d72ce54de0070493e9a23efb8907e06.tar.gz frameworks_av-dc468c5f9d72ce54de0070493e9a23efb8907e06.tar.bz2 |
Work around several issues with non-compliant RTSP servers.
In this particular case these RTSP servers were implemented as local services,
retransmitting live streams via a local RTSP server instance.
They picked wrong rtp/rtcp port pairs (odd rtp port), blank lines in the session
description, wrong case of the format description, relative base URLs...
Change-Id: I63fa90ca2398f19e8b52c147248bd2c5c2372426
related-to-bug: 3452103
Diffstat (limited to 'media/libstagefright/rtsp/ASessionDescription.cpp')
-rw-r--r-- | media/libstagefright/rtsp/ASessionDescription.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/libstagefright/rtsp/ASessionDescription.cpp b/media/libstagefright/rtsp/ASessionDescription.cpp index 3e710dc..f03f7a2 100644 --- a/media/libstagefright/rtsp/ASessionDescription.cpp +++ b/media/libstagefright/rtsp/ASessionDescription.cpp @@ -71,6 +71,11 @@ bool ASessionDescription::parse(const void *data, size_t size) { line.setTo(desc, i, eolPos - i); } + if (line.empty()) { + i = eolPos + 1; + continue; + } + if (line.size() < 2 || line.c_str()[1] != '=') { return false; } |