MediaInput/Output: Inherit base virtually
This commit is contained in:
@@ -119,7 +119,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class BMediaInput : public BMediaConnection {
|
||||
class BMediaInput : public virtual BMediaConnection {
|
||||
public:
|
||||
BMediaInput();
|
||||
|
||||
@@ -149,7 +149,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class BMediaOutput : public BMediaConnection {
|
||||
class BMediaOutput : public virtual BMediaConnection {
|
||||
public:
|
||||
BMediaOutput();
|
||||
|
||||
|
||||
@@ -147,9 +147,9 @@ BMediaClient::Connect(BMediaConnection* ourConnection,
|
||||
CALLED();
|
||||
|
||||
if (ourConnection->IsOutput() && theirConnection.IsInput())
|
||||
return _ConnectInput((BMediaOutput*)ourConnection, theirConnection);
|
||||
return _ConnectInput(dynamic_cast<BMediaOutput*>(ourConnection), theirConnection);
|
||||
else if (ourConnection->IsInput() && theirConnection.IsOutput())
|
||||
return _ConnectOutput((BMediaInput*)ourConnection, theirConnection);
|
||||
return _ConnectOutput(dynamic_cast<BMediaInput*>(ourConnection), theirConnection);
|
||||
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user