[PATCH 07/10] mf: Introduce topology_loader_connect_source() to handle connections of source nodes in _Load().

Nikolay Sivov nsivov at codeweavers.com
Mon Jun 22 06:53:10 CDT 2020



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.




More information about the wine-devel mailing list