Permalink
Browse files

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
  • Loading branch information...
1 parent f6f539a commit b52213cb3abc487d6df46449a3fae9044ada4f35 Eli K committed Feb 20, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 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());

0 comments on commit b52213c

Please sign in to comment.