File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -60,13 +60,26 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url)
60
60
if (!mMediaPlugin )
61
61
return ;
62
62
63
- if (!url.empty ()) {
63
+ if (!url.empty ())
64
+ {
64
65
LL_INFOS () << " Starting internet stream: " << url << LL_ENDL;
65
- mURL = url;
66
- mMediaPlugin ->loadURI ( url );
66
+
67
+ mURL = url; // keep original url here for comparison purposes
68
+ std::string snt_url = url;
69
+ LLStringUtil::trim (snt_url);
70
+ size_t pos = snt_url.find (' ' );
71
+ if (pos != std::string::npos)
72
+ {
73
+ // fmod permited having names after the url and people were using it.
74
+ // People label their streams this way, ignore the 'label'.
75
+ snt_url = snt_url.substr (0 , pos);
76
+ }
77
+ mMediaPlugin ->loadURI (snt_url);
67
78
mMediaPlugin ->start ();
68
79
LL_INFOS () << " Playing stream..." << LL_ENDL;
69
- } else {
80
+ }
81
+ else
82
+ {
70
83
LL_INFOS () << " setting stream to NULL" << LL_ENDL;
71
84
mURL .clear ();
72
85
mMediaPlugin ->stop ();
You can’t perform that action at this time.
0 commit comments