MediaClient: Use unique id for both inputs and outputs

This commit is contained in:
Dario Casalinuovo 2016-11-25 00:26:02 +01:00
parent dd3732bb93
commit eebedf8f1a
2 changed files with 3 additions and 11 deletions

View File

@ -218,8 +218,7 @@ private:
BObjectList<BMediaConnection> fInputs;
BObjectList<BMediaConnection> fOutputs;
int32 fLastInputID;
int32 fLastOutputID;
media_connection_id fLastID;
virtual void _ReservedMediaClient0();
virtual void _ReservedMediaClient1();

View File

@ -16,8 +16,7 @@
BMediaClient::BMediaClient(const char* name,
media_type type, media_client_kind kind)
:
fLastInputID(0),
fLastOutputID(0)
fLastID(0)
{
CALLED();
@ -77,13 +76,7 @@ BMediaClient::BeginConnection(media_connection_kind kind)
{
CALLED();
media_connection_id id;
if (kind == B_MEDIA_INPUT)
id = fLastInputID++;
else
id = fLastOutputID++;
BMediaConnection* conn = new BMediaConnection(this, kind, id);
BMediaConnection* conn = new BMediaConnection(this, kind, fLastID++);
AddConnection(conn);
return conn;
}