diff options
author | Chong Zhang <chz@google.com> | 2015-05-04 17:27:50 -0700 |
---|---|---|
committer | Chong Zhang <chz@google.com> | 2015-05-04 17:27:50 -0700 |
commit | 5efccd8da813133060c089c647b07434116406cb (patch) | |
tree | 86bee39537c7b0157920d979e70e783a09796634 /media | |
parent | 32fa6d0e65dbf956e253a1006e9419dce2fe75c9 (diff) | |
download | frameworks_av-5efccd8da813133060c089c647b07434116406cb.zip frameworks_av-5efccd8da813133060c089c647b07434116406cb.tar.gz frameworks_av-5efccd8da813133060c089c647b07434116406cb.tar.bz2 |
RTSP: append track URL to base URL
bug: 17310253
Change-Id: I6ce8c4740a3509d82323ccc05f82cb842368caee
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/rtsp/MyHandler.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h index 00f071b..ba17e90 100644 --- a/media/libstagefright/rtsp/MyHandler.h +++ b/media/libstagefright/rtsp/MyHandler.h @@ -1673,21 +1673,11 @@ private: } size_t n = strlen(baseURL); - if (baseURL[n - 1] == '/') { - out->setTo(baseURL); - out->append(url); - } else { - const char *slashPos = strrchr(baseURL, '/'); - - if (slashPos > &baseURL[6]) { - out->setTo(baseURL, slashPos - baseURL); - } else { - out->setTo(baseURL); - } - + out->setTo(baseURL); + if (baseURL[n - 1] != '/') { out->append("/"); - out->append(url); } + out->append(url); return true; } |