[vlc-devel] [PATCH] fourcc: refactor Lookup
Zhao Zhili
wantlamy at gmail.com
Mon Jun 13 12:21:56 CEST 2016
I'm not sure abour this part: should we do bsearch() on original fourcc
when fourcc != mapping->fourcc?
Maybe I'm doing it wrong.
On Mon, Jun 13, 2016 at 6:12 PM, Zhao Zhili <wantlamy at gmail.com> wrote:
>
> ---
> 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)
> --
> 1.9.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160613/c79fdf74/attachment.html>
More information about the vlc-devel
mailing list