Skip to content

Commit

Permalink
Refs #10961. Add missing RunProlog()/RunEpilog()
Browse files Browse the repository at this point in the history
I don't know if this addresses the issue of the ticket or not
but this should address the warnings about DB connection handling
in #10934 which may be related. FYI The QRunnable::run()
implementations don't need this as calling this is handled
by MThreadPool for those.
  • Loading branch information
daniel-kristjansson committed Jul 31, 2012
1 parent a7f980f commit 5cc6d1c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mythtv/libs/libmythtv/HLS/httplivestreambuffer.cpp
Expand Up @@ -1024,6 +1024,8 @@ class StreamWorker : public MThread
protected:
void run(void)
{
RunProlog();

int retries = 0;
while (!m_interrupted)
{
Expand Down Expand Up @@ -1121,6 +1123,8 @@ class StreamWorker : public MThread
// Signal we're done
Wakeup();
}

RunEpilog();
}

int BandwidthAdaptation(int progid, uint64_t &bandwidth)
Expand Down Expand Up @@ -1210,6 +1214,8 @@ class PlaylistWorker : public MThread
protected:
void run(void)
{
RunProlog();

double wait = 0.5;
double factor = m_parent->GetCurrentStream()->Live() ? 1.0 : 2.0;

Expand Down Expand Up @@ -1288,6 +1294,8 @@ class PlaylistWorker : public MThread
m_wakeup = ((int64_t)(hls->TargetDuration() * wait * factor)
* (int64_t)1000);
}

RunEpilog();
}

private:
Expand Down

0 comments on commit 5cc6d1c

Please sign in to comment.