Skip to content
This repository has been archived by the owner on Dec 21, 2020. It is now read-only.

Commit

Permalink
do not trigger re-tune channel on pmt change event
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed May 1, 2014
1 parent e831257 commit 031f69b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions videoinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void cLiveReceiver::Receive(uchar *Data, int Length)
inline void cLiveReceiver::Activate(bool On)
{
DEBUGLOG("activate live receiver: %d", On);
if (!On)
if (!On && !m_VideoInput->m_PmtChange)
{
m_VideoInput->Retune();
}
Expand Down Expand Up @@ -437,6 +437,7 @@ bool cVideoInput::Open(const cChannel *channel, int priority, cVideoBuffer *vide

void cVideoInput::Close()
{
INFOLOG("close video input ...");
Cancel(5);

if (m_Device)
Expand Down Expand Up @@ -514,11 +515,11 @@ void cVideoInput::PmtChange(int pidChange)
if (pidChange)
{
INFOLOG("Video Input - new pmt, attaching receiver");
m_PmtChange = true;
m_Device->Detach(m_Receiver);
m_Receiver->SetPids(NULL);
m_Receiver->SetPids(&m_Receiver->m_PmtChannel);
m_Receiver->AddPid(m_Receiver->m_PmtChannel.Tpid());
m_PmtChange = true;
m_Device->AttachReceiver(m_Receiver);
m_SeenPmt = true;
}
Expand All @@ -541,6 +542,7 @@ inline void cVideoInput::Receive(uchar *data, int length)

void cVideoInput::Retune()
{
INFOLOG("call retune ...");
cMutexLock lock(&m_Mutex);
m_IsRetune = true;
m_Event.Broadcast();
Expand Down

0 comments on commit 031f69b

Please sign in to comment.