servicemp3/record: User-Agent can be set also by rtsp source
authormx3L <mx3ldev@gmail.com>
Thu, 3 Dec 2015 19:36:52 +0000 (20:36 +0100)
committermx3L <mx3ldev@gmail.com>
Fri, 4 Dec 2015 07:38:40 +0000 (08:38 +0100)
lib/service/servicemp3.cpp
lib/service/servicemp3record.cpp

index 35d8b0f..08202be 100644 (file)
@@ -439,7 +439,7 @@ eServiceMP3::eServiceMP3(eServiceReference ref):
        const char *filename;
        std::string filename_str;
        size_t pos = m_ref.path.find('#');
-       if (pos != std::string::npos && m_ref.path.compare(0, 4, "http") == 0)
+       if (pos != std::string::npos && (m_ref.path.compare(0, 4, "http") == 0 || m_ref.path.compare(0, 4, "rtsp") == 0))
        {
                filename_str = m_ref.path.substr(0, pos);
                filename = filename_str.c_str();
index 01a1316..6d06602 100644 (file)
@@ -133,7 +133,7 @@ int eServiceMP3Record::doPrepare()
                gchar *uri;
                size_t pos = m_ref.path.find('#');
                std::string stream_uri;
-               if (pos != std::string::npos && m_ref.path.compare(0, 4, "http") == 0)
+               if (pos != std::string::npos && (m_ref.path.compare(0, 4, "http") == 0 || m_ref.path.compare(0, 4, "rtsp") == 0))
                {
                        stream_uri = m_ref.path.substr(0, pos);
                        m_extra_headers = m_ref.path.substr(pos + 1);