On 5/28/21 10:50 AM, Giovanni Mascellani wrote:
if (fastest) { if (SUCCEEDED(hr = IMFRateSupport_GetFastestRate(rate_support, direction, thin, &rate)))
*result = min(fabsf(rate), *result);
if (fabsf(rate) < fabsf(*result))
} else { if (SUCCEEDED(hr = IMFRateSupport_GetSlowestRate(rate_support, direction, thin, &rate)))*result = rate;
*result = max(fabsf(rate), *result);
if (fabsf(rate) > fabsf(*result))
*result = rate;
}
IMFRateSupport_Release(rate_support);
@@ -3532,7 +3535,7 @@ static HRESULT session_get_presentation_rate(struct media_session *session, MFRA struct media_sink *sink; HRESULT hr = E_POINTER;
- *result = 0.0f;
*result = fastest ? (direction == MFRATE_FORWARD ? FLT_MAX : -FLT_MAX) : 0.0f;
EnterCriticalSection(&session->cs);
These two changes (or three) changes are separate. Second changes default even when none of components support rate change. How did you test this?