Skip to content

Commit

Permalink
IPTV HLS Do not reset sequence number on EXT-X-DISCONTINUITY
Browse files Browse the repository at this point in the history
The EXT-X-DISCONTINUITY tag indicates that there can be a change
in file format, number and identifiers of tracks and a bit more
as described in https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.2.3
When the seqeunce number is reset then all segments described in the playlist
are played again, causing repeated reload and redisplay of segments that
have already been displayed. This is not something that should be done
when a EXT-X-DISCONTINUITY tag is seen.
Example stream is https://food-us.xumo.wurl.tv/playlist.m3u8
where the sections between the items are marked with
the EXT-X-DISCONTINUITY tag.
The new behavior is similar to that of VLC on the example stream.

Refs MythTV#936
  • Loading branch information
kmdewaal committed Jan 12, 2025
1 parent 42970b8 commit 49be1f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recorders/HLS/HLSReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ bool HLSReader::ParseM3U8(const QByteArray& buffer, HLSRecStream* stream)
{
if (!M3U::ParseDiscontinuity(line, StreamURL()))
return false;
ResetSequence();
// Not handled yet
}
else if (line.startsWith(QLatin1String("#EXT-X-INDEPENDENT-SEGMENTS")))
{
Expand Down
7 changes: 5 additions & 2 deletions mythtv/libs/libmythui/opengl/mythrenderopengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ MythRenderOpenGL* MythRenderOpenGL::Create(QWidget *Widget)
format.setRenderableType(QSurfaceFormat::OpenGLES);
}

// KdW test
format.setRenderableType(QSurfaceFormat::OpenGL);

if (VERBOSE_LEVEL_CHECK(VB_GPU, LOG_INFO))
format.setOption(QSurfaceFormat::DebugContext);

Expand Down Expand Up @@ -541,12 +544,12 @@ void MythRenderOpenGL::SetWidget(QWidget *Widget)
return;
}

#ifdef Q_OS_ANDROID
// #ifdef Q_OS_ANDROID // KdW test
// Ensure surface type is always OpenGL
m_window->setSurfaceType(QWindow::OpenGLSurface);
if (native && native->windowHandle())
native->windowHandle()->setSurfaceType(QWindow::OpenGLSurface);
#endif
// #endif

#ifdef USING_QTWEBENGINE
auto * globalcontext = QOpenGLContext::globalShareContext();
Expand Down

0 comments on commit 49be1f0

Please sign in to comment.