Skip to content

Commit

Permalink
Refs #10970. Don't print EOF as error if it's expected.
Browse files Browse the repository at this point in the history
This isn't the cause of any issues, it's just a bit confusing when reading the logs.
When we close a DRB we are expecting a EOF so it's not an error when we see it..
  • Loading branch information
daniel-kristjansson committed Aug 3, 2012
1 parent ff9073d commit 9f0be65
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions mythtv/libs/libmythtv/dvbstreamhandler.cpp
Expand Up @@ -97,8 +97,14 @@ DVBStreamHandler::DVBStreamHandler(const QString &dvb_device) :
void DVBStreamHandler::SetRunningDesired(bool desired)
{
if (_drb && _running_desired && !desired)
{
StreamHandler::SetRunningDesired(desired);
_drb->Stop();
StreamHandler::SetRunningDesired(desired);
}
else
{
StreamHandler::SetRunningDesired(desired);
}
}

void DVBStreamHandler::run(void)
Expand Down Expand Up @@ -179,9 +185,12 @@ void DVBStreamHandler::RunTS(void)
drb->Start();
}

SetRunning(true, _needs_buffering, false);
{
// SetRunning() + set _drb
QMutexLocker locker(&_start_stop_lock);
_running = true;
_using_buffering = _needs_buffering;
_using_section_reader = false;
_drb = drb;
}

Expand Down Expand Up @@ -209,7 +218,7 @@ void DVBStreamHandler::RunTS(void)
_error = true;
}

if (drb->IsEOF())
if (drb->IsEOF() && _running_desired)
{
LOG(VB_GENERAL, LOG_ERR, LOC + "Device EOF detected");
_error = true;
Expand Down

0 comments on commit 9f0be65

Please sign in to comment.