MediaClientNode: Fix PrepareToConnect with unknown media_type.

This commit is contained in:
Dario Casalinuovo 2016-11-24 00:46:13 +01:00
parent 8e980a4066
commit 300e9786ef

View File

@ -417,8 +417,10 @@ BMediaClientNode::PrepareToConnect(const media_source& source,
if (conn->Destination() != media_destination::null)
return B_MEDIA_ALREADY_CONNECTED;
if (format->type != fOwner->MediaType())
if (fOwner->MediaType() != B_MEDIA_UNKNOWN_TYPE
&& format->type != fOwner->MediaType()) {
return B_MEDIA_BAD_FORMAT;
}
conn->fConnection.destination = dest;
conn->SetAcceptedFormat(*format);