summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDario Casalinuovo <b.vitruvio@gmail.com>2017-01-10 21:44:16 (GMT)
committerDario Casalinuovo <b.vitruvio@gmail.com>2017-01-10 21:44:16 (GMT)
commite7aa210bca0016b648411c8be84b40b3e19d9b9a (patch)
treef87e8454321b64e2db9c36b48f4e0250e9109ea1
parent3dbb4ff62d7578f2e873ed2f13fa023e51f07994 (diff)
MediaClient: IsRunning() status is set at handle time
-rwxr-xr-xsrc/kits/media/MediaClient.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/kits/media/MediaClient.cpp b/src/kits/media/MediaClient.cpp
index ac76434..4ad3a97 100755
--- a/src/kits/media/MediaClient.cpp
+++ b/src/kits/media/MediaClient.cpp
@@ -296,15 +296,8 @@ BMediaClient::Start(bool force)
remoteNode, fNode->TimeSource()->Now());
}
- err = BMediaRoster::CurrentRoster()->StartNode(
+ return BMediaRoster::CurrentRoster()->StartNode(
fNode->Node(), fNode->TimeSource()->Now());
-
- if (err == B_OK)
- fRunning = true;
- else
- fRunning = false;
-
- return err;
}
@@ -313,15 +306,8 @@ BMediaClient::Stop(bool force)
{
CALLED();
- status_t err = BMediaRoster::CurrentRoster()->StopNode(
+ return BMediaRoster::CurrentRoster()->StopNode(
fNode->Node(), fNode->TimeSource()->Now());
-
- if (err == B_OK)
- fRunning = false;
- else
- fRunning = true;
-
- return err;
}
@@ -452,12 +438,14 @@ BMediaClient::AddOn(int32* id) const
void
BMediaClient::HandleStart(bigtime_t performanceTime)
{
+ fRunning = true;
}
void
BMediaClient::HandleStop(bigtime_t performanceTime)
{
+ fRunning = false;
}