[mythtv-commits] Ticket #12856: mythbackend seg fault livetv via Kodi using Vbox Tuner
MythTV
noreply at mythtv.org
Tue Jan 17 12:40:42 UTC 2017
#12856: mythbackend seg fault livetv via Kodi using Vbox Tuner
--------------------------------+-----------------------------
Reporter: mike.bibbings@… | Owner:
Type: Bug Report - Crash | Status: new
Priority: minor | Milestone: 0.28.1
Component: MythTV - General | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-----------------------------
Comment (by mike.bibbings@…):
Possible solution to original problem:
Based on my understanding (which is limited) of HLSPLaylists within
current Mythtv, the URL should end with either .m3u8 or .m3u.
I have modified IsHLSPlaylist in file iptvtuningdata.h to return false
unless URL ends in either .m3u8 or .m3u in which case MythSingleDownload
will be triggered. VBox channel URLs (in iptv_channel table) do not end
with either .m3u8 or .m3u.
This has been tested on mythtv master
{{{
diff --git a/mythtv/libs/libmythtv/iptvtuningdata.h
b/mythtv/libs/libmythtv/iptvtuningdata.h
index c5a3c2e..c86b14d 100644
--- a/mythtv/libs/libmythtv/iptvtuningdata.h
+++ b/mythtv/libs/libmythtv/iptvtuningdata.h
@@ -220,13 +220,29 @@ class MTV_PUBLIC IPTVTuningData
protected:
bool IsHLSPlaylist(void)
{
- if (!qApp)
+ if (!qApp)
{
LOG(VB_GENERAL, LOG_ERR, QString("IsHLSPlaylist - No
QApplication!!"));
return false;
}
QString url = m_data_url.toString();
+
+ // check url is valid for a playlist before downloading (see trac
ticket #12856)
+ if(url.endsWith(".m3u8", Qt::CaseInsensitive) ||
+ url.endsWith(".m3u", Qt::CaseInsensitive))
+ {
+ LOG(VB_RECORD, LOG_INFO, QString("IsHLSPlaylist url ends with
either .m3u8 or .m3u %1")
+ .arg(url));
+ }
+ else
+ {
+ // not a valid playlist so just return false
+ LOG(VB_RECORD, LOG_INFO, QString("IsHLSPlaylist url does not
end with either .m3u8 or .m3u %1")
+ .arg(url));
+ return false;
+ }
+
QByteArray buffer;
MythSingleDownload downloader;
}}}
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12856#comment:15>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list