On 19/02/2017 19:46, Mark Thompson wrote:
> ---
>  libavutil/hwcontext.c | 11 +++++++++++
>  libavutil/hwcontext.h |  8 ++++++++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
> index 1f9442622..e3484c78c 100644
> --- a/libavutil/hwcontext.c
> +++ b/libavutil/hwcontext.c
> @@ -18,6 +18,7 @@
>  
>  #include "config.h"
>  
> +#include "avstring.h"
>  #include "buffer.h"
>  #include "common.h"
>  #include "hwcontext.h"
> @@ -47,6 +48,16 @@ static const HWContextType * const hw_table[] = {
>      NULL,
>  };
>  
> +enum AVHWDeviceType av_hwdevice_find_type_by_name(const char *name)
> +{
> +    int i;
> +    for (i = 0; hw_table[i]; i++) {
> +        if (!av_strcasecmp(hw_table[i]->name, name))
> +            return hw_table[i]->type;
> +    }
> +    return -1;

Maybe make it part of the enum.

> +}
> +

The rest looks fine.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to