avutil/csp: eliminate redundant branch

This commit is contained in:
Niklas Haas 2024-11-25 13:07:35 +01:00
parent ec0489e35c
commit feb5982f43

View File

@ -290,11 +290,7 @@ static const av_csp_trc_function trc_funcs[AVCOL_TRC_NB] = {
av_csp_trc_function av_csp_trc_func_from_id(enum AVColorTransferCharacteristic trc)
{
av_csp_trc_function func;
if (trc >= AVCOL_TRC_NB)
return NULL;
func = trc_funcs[trc];
if (!func)
return NULL;
return func;
return trc_funcs[trc];
}