BMediaRecorder: Fix unneeded argument and error check

This commit is contained in:
Dario Casalinuovo 2016-02-09 14:11:29 +01:00
parent 7b83e044e7
commit cc0d365ef7
3 changed files with 6 additions and 5 deletions

View File

@ -76,8 +76,7 @@ protected:
virtual void BufferReceived(void* buffer, size_t size,
const media_header& header);
status_t SetUpConnection(media_input ourInput,
media_source outputSource);
status_t SetUpConnection(media_source outputSource);
private:

View File

@ -354,7 +354,7 @@ BMediaRecorder::Format() const
status_t
BMediaRecorder::SetUpConnection(media_input ourInput, media_source outputSource)
BMediaRecorder::SetUpConnection(media_source outputSource)
{
fOutputSource = outputSource;

View File

@ -301,11 +301,13 @@ BMediaRecorderNode::Connected(const media_source &producer,
// so that our owner class can do it's operations.
media_node node;
BMediaRosterEx* roster = MediaRosterEx(BMediaRoster::CurrentRoster());
roster->GetNodeFor(roster->NodeIDFor(producer.port), &node);
if (roster->GetNodeFor(roster->NodeIDFor(producer.port), &node) != B_OK)
return B_MEDIA_BAD_NODE;
fRecorder->fOutputNode = node;
fRecorder->fReleaseOutputNode = true;
fRecorder->SetUpConnection(fInput, producer);
fRecorder->SetUpConnection(producer);
fRecorder->fConnected = true;
return B_OK;