diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-08-05 23:13:42 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-08-06 10:10:22 +0300 |
commit | c25df5224f7bf150ddc56014b0389985da2eb542 (patch) | |
tree | fccc6110e8a93006f7f0196fee32cca1f72f5859 /indra/newview | |
parent | c8f1890f963a7c6ec288e3155e553f9411101417 (diff) |
#3564 Permit 'labeling' audio streams that play via media plugin
People were using fmod's undocumented capability to ignore everything
after the url to label their streams.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewermedia_streamingaudio.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llviewermedia_streamingaudio.cpp b/indra/newview/llviewermedia_streamingaudio.cpp index b68ffbe1a2..4a1c433f8e 100644 --- a/indra/newview/llviewermedia_streamingaudio.cpp +++ b/indra/newview/llviewermedia_streamingaudio.cpp @@ -60,13 +60,26 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url) if(!mMediaPlugin) return; - if (!url.empty()) { + if (!url.empty()) + { LL_INFOS() << "Starting internet stream: " << url << LL_ENDL; - mURL = url; - mMediaPlugin->loadURI ( url ); + + mURL = url; // keep original url here for comparison purposes + std::string snt_url = url; + LLStringUtil::trim(snt_url); + size_t pos = snt_url.find(' '); + if (pos != std::string::npos) + { + // fmod permited having names after the url and people were using it. + // People label their streams this way, ignore the 'label'. + snt_url = snt_url.substr(0, pos); + } + mMediaPlugin->loadURI(snt_url); mMediaPlugin->start(); LL_INFOS() << "Playing stream..." << LL_ENDL; - } else { + } + else + { LL_INFOS() << "setting stream to NULL"<< LL_ENDL; mURL.clear(); mMediaPlugin->stop(); |