From: Nikolay Sivov Subject: Re: [PATCH 07/10] mf: Introduce topology_loader_connect_source() to handle connections of source nodes in _Load(). Message-Id: <75681f2c-72dd-9cfe-13cc-4a627aa24ab8@codeweavers.com> Date: Mon, 22 Jun 2020 14:53:10 +0300 In-Reply-To: <20200615014158.6836-7-sdelreal@codeweavers.com> References: <20200615014158.6836-1-sdelreal@codeweavers.com> <20200615014158.6836-7-sdelreal@codeweavers.com> On 6/15/20 4:41 AM, Sergio Gómez Del Real wrote: > + hr = IMFAttributes_GetUINT32(attrs_src, &MF_TOPONODE_CONNECT_METHOD, &method); > + if (!enum_src_types || (hr == S_OK && !(method & MF_CONNECT_RESOLVE_INDEPENDENT_OUTPUTTYPES))) > + { > + for (method = MF_CONNECT_DIRECT; method < MF_CONNECT_RESOLVE_INDEPENDENT_OUTPUTTYPES; method++) > + { > + for (i = 0; i < num_media_types; i++) > + { > + IMFMediaTypeHandler_SetCurrentMediaType(mth_src, src_mediatypes[i]); > + hr = S_OK; > + goto out; > + } > + } > + } > + else > + { > + for (i = 0; i < num_media_types; i++) > + { > + for (method = MF_CONNECT_DIRECT; method < MF_CONNECT_RESOLVE_INDEPENDENT_OUTPUTTYPES; method++) > + { > + IMFMediaTypeHandler_SetCurrentMediaType(mth_src, src_mediatypes[i]); > + hr = S_OK; > + goto out; > + } > + } > + } I think this was carried from previous iteration of the patches? I think same concern still apply, why specified method is essentially ignored? Loops are reduced to 1 iteration until following patches, it's better to avoid that.