Skip to content

Commit

Permalink
Ignore invalid sub-stream entries.
Browse files Browse the repository at this point in the history
A HLS stream may contain various bitrate streams, if one failed to download we would abort. Now just ignore it and continue

Fixes #10988
  • Loading branch information
jyavenard committed Aug 11, 2012
1 parent dfc0c1f commit 30d75bc
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions mythtv/libs/libmythtv/HLS/httplivestreambuffer.cpp
Expand Up @@ -2164,11 +2164,20 @@ int HLSRingBuffer::ParseM3U8(const QByteArray *buffer, StreamsList *streams)
HLSStream *hls = ParseStreamInformation(line, uri);
if (hls)
{
streams->append(hls);
/* Download playlist file from server */
QByteArray buf;
bool ret = downloadURL(hls->Url(), &buf);
if (!ret || m_killed)
if (!ret)
{
LOG(VB_GENERAL, LOG_INFO, LOC +
QString("Skipping invalid stream, couldn't download: %1")
.arg(hls->Url()));
delete hls;
continue;
}
streams->append(hls);
// One last chance to abort early
if (m_killed)
{
err = RET_ERROR;
break;
Expand Down

0 comments on commit 30d75bc

Please sign in to comment.