From: "Sergio Gómez Del Real" Subject: Re: [PATCH 07/10] mf: Introduce topology_loader_connect_source() to handle connections of source nodes in _Load(). Message-Id: <4487d5e0-9ff8-997b-f4d1-041bd789f92f@codeweavers.com> Date: Mon, 22 Jun 2020 19:37:43 -0500 In-Reply-To: <75681f2c-72dd-9cfe-13cc-4a627aa24ab8@codeweavers.com> References: <20200615014158.6836-1-sdelreal@codeweavers.com> <20200615014158.6836-7-sdelreal@codeweavers.com> <75681f2c-72dd-9cfe-13cc-4a627aa24ab8@codeweavers.com> On 22/06/20 6:53 a. m., Nikolay Sivov wrote: > > 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. > Yes, this is indeed incorrect. Forgot to apply the modifications I had. Will send them in next iteration.