@@ -3546,7 +3546,6 @@ ps_ptr<char> Audio::parsePlaylist_M3U8() {
35463546
35473547 if (f_haveRedirection) {
35483548 m_lastM3U8host.clone_from (m3u8redirection (&m_m3u8Codec));
3549- accomplish_m3u8_url ();
35503549 vector_clear_and_shrink (m_playlistContent);
35513550 return {};
35523551 }
@@ -3640,7 +3639,7 @@ ps_ptr<char>Audio::m3u8redirection(uint8_t* codec) {
36403639 while (line.starts_with (" ../" )){
36413640 line.remove_prefix (" ../" );
36423641 }
3643- result.clone_from (m_lastHost );
3642+ result.clone_from (m_currentHost );
36443643 int idx = result.last_index_of (' /' );
36453644 if (idx > 0 && (size_t )idx != result.strlen () - 1 ) result.truncate_at ((size_t )idx + 1 );
36463645 result.append (line.get ());
@@ -3651,8 +3650,8 @@ ps_ptr<char>Audio::m3u8redirection(uint8_t* codec) {
36513650 // chunklist_w789468022.m3u8 line
36523651 // http://arcast.com.ar:1935/radio/radionar.stream/chunklist_w789468022.m3u8 --> result
36533652
3654- result.clone_from (m_lastHost );
3655- int pos = m_lastHost .last_index_of (' /' );
3653+ result.clone_from (m_currentHost );
3654+ int pos = m_currentHost .last_index_of (' /' );
36563655 if (pos > 0 ){
36573656 result.truncate_at ((size_t )pos + 1 );
36583657 result.append (line.get ());
@@ -4327,7 +4326,7 @@ bool Audio::parseHttpResponseHeader() { // this is the response to a GET / reque
43274326 if (!strncmp (c_host, m_currentHost.get (), pos_slash)) {
43284327 info (evt_info, " redirect to new extension at existing host \" %s\" " , c_host);
43294328 if (m_playlistFormat == FORMAT_M3U8) {
4330- m_lastHost.assign (c_host);
4329+ // m_lastHost.assign(c_host);
43314330 m_f_m3u8data = true ;
43324331 }
43334332 httpPrint (c_host);
0 commit comments