[haiku-commits] haiku: hrev50077 - src/kits/media headers/private/media

  • From: b.vitruvio@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 9 Feb 2016 14:26:53 +0100 (CET)

hrev50077 adds 1 changeset to branch 'master'
old head: 7b83e044e7b0115b8e2a6e483efb3720b6d4fc4c
new head: cc0d365ef7550b8613c8aa72c61ac24fd1260f68
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=cc0d365ef755+%5E7b83e044e7b0

----------------------------------------------------------------------------

cc0d365ef755: BMediaRecorder: Fix unneeded argument and error check

                                [ Dario Casalinuovo <b.vitruvio@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev50077
Commit:      cc0d365ef7550b8613c8aa72c61ac24fd1260f68
URL:         http://cgit.haiku-os.org/haiku/commit/?id=cc0d365ef755
Author:      Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
Date:        Tue Feb  9 13:11:29 2016 UTC

----------------------------------------------------------------------------

3 files changed, 6 insertions(+), 5 deletions(-)
headers/private/media/MediaRecorder.h | 3 +--
src/kits/media/MediaRecorder.cpp      | 2 +-
src/kits/media/MediaRecorderNode.cpp  | 6 ++++--

----------------------------------------------------------------------------

diff --git a/headers/private/media/MediaRecorder.h 
b/headers/private/media/MediaRecorder.h
index eeb64f0..885c277 100644
--- a/headers/private/media/MediaRecorder.h
+++ b/headers/private/media/MediaRecorder.h
@@ -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:
 
diff --git a/src/kits/media/MediaRecorder.cpp b/src/kits/media/MediaRecorder.cpp
index 5738e93..665bbf0 100644
--- a/src/kits/media/MediaRecorder.cpp
+++ b/src/kits/media/MediaRecorder.cpp
@@ -354,7 +354,7 @@ BMediaRecorder::Format() const
 
 
 status_t
-BMediaRecorder::SetUpConnection(media_input ourInput, media_source 
outputSource)
+BMediaRecorder::SetUpConnection(media_source outputSource)
 {
        fOutputSource = outputSource;
 
diff --git a/src/kits/media/MediaRecorderNode.cpp 
b/src/kits/media/MediaRecorderNode.cpp
index 87ef527..6a7a3a5 100644
--- a/src/kits/media/MediaRecorderNode.cpp
+++ b/src/kits/media/MediaRecorderNode.cpp
@@ -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;


Other related posts:

  • » [haiku-commits] haiku: hrev50077 - src/kits/media headers/private/media - b . vitruvio