Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix deletion of URL string for variable length playlists. #4244

Merged
merged 1 commit into from

5 participants

@voguemaster

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.

The scope of this bug is that any variable length m3u/m3u8 playlist cannot be played.
The changes were made in commits c0f4ccb and
3269510.

Eli K 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
b52213c
@t-nelson

I think the more correct fix is to drop c_str() from from the assignment on line 64.

Err, sorry. Scratch that. Someone is mixing conventions on me... str* used to only be CStdStrings.

@t-nelson

jenkins build this please

@t-nelson t-nelson merged commit b4f1ac4 into xbmc:master
@jmarshallnz
Owner

/me adds to the TODO list: Replace const char* in Open() with const std::string &.

@elupus
Collaborator

Crap.. how did i miss that

@voguemaster

Apparently there's also a ticket for this:
http://trac.xbmc.org/ticket/14918

Seems to coincide exactly with PR #4083 which was done on 27/1. Looking at the logs of that
ticket we can see that in the 0128 log (the successful one), after auto-selecting finds the playlist
the log shows the demuxer is opened successfully.
On the 0129 log, it errors out with "could not open file M"
(that M seems like a strong indicator of printing garbage..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 20, 2014
  1. Fix deletion of URL string for variable length playlists.

    Eli K authored
    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
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamFFmpeg.cpp
View
3  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());
Something went wrong with that request. Please try again.