From b52213cb3abc487d6df46449a3fae9044ada4f35 Mon Sep 17 00:00:00 2001 From: Eli K <eli@algotec.co.il> Date: Thu, 20 Feb 2014 02:02:22 +0200 Subject: Fix deletion of URL string for variable length playlists. When the playlist M3U helper selects a specific M3U/8 playlist it will overwrite the strFile pointer with the internal contents of selected. However, selected then goes out of scope leaving garbage as the URL --- xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.cpp index c6674ad84b..97db5cdf36 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.cpp @@ -51,13 +51,14 @@ bool CDVDInputStreamFFmpeg::IsEOF() bool CDVDInputStreamFFmpeg::Open(const char* strFile, const std::string& content) { CFileItem item(strFile, false); + std::string selected; if (item.IsInternetStream() && item.IsType(".m3u8")) { // get the available bandwidth and determine the most appropriate stream int bandwidth = CSettings::Get().GetInt("network.bandwidth"); if(bandwidth <= 0) bandwidth = INT_MAX; - std::string selected = PLAYLIST::CPlayListM3U::GetBestBandwidthStream(strFile, bandwidth); + selected = PLAYLIST::CPlayListM3U::GetBestBandwidthStream(strFile, bandwidth); if (selected.compare(strFile) != 0) { CLog::Log(LOGINFO, "CDVDInputStreamFFmpeg: Auto-selecting %s based on configured bandwidth.", selected.c_str()); -- cgit v1.2.3