[vlc-devel] [PATCH] fourcc: refactor Lookup

Rémi Denis-Courmont remi at remlab.net
Mon Jun 13 14:18:35 CEST 2016


Le 2016-06-13 12:12, Zhao Zhili a écrit :
> ---
>  src/misc/fourcc.c | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
> index 51c36a1..d69c49b 100644
> --- a/src/misc/fourcc.c
> +++ b/src/misc/fourcc.c
> @@ -49,18 +49,7 @@ static vlc_fourcc_t Lookup(vlc_fourcc_t fourcc,
> const char **restrict dsc,
>  
>      mapping = bsearch(&fourcc, mapv, mapc, sizeof (*mapv),
> fourcc_cmp);
>      if (mapping != NULL)
> -    {
> -        if (dsc != NULL)
> -        {
> -            desc = bsearch(&fourcc, dscv, dscc, sizeof
> (*dscv), fourcc_cmp);
> -            if (desc != NULL)
> -            {
> -                *dsc = desc->desc;
> -                return mapping->fourcc;
> -            }
> -        }
>          fourcc = mapping->fourcc;
> -    }
>  
>      desc = bsearch(&fourcc, dscv, dscc, sizeof (*dscv),
> fourcc_cmp);
>      if (desc == NULL)

Doesn't this break E() fourCC entries?

-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the vlc-devel mailing list