diff mbox series

[FFmpeg-devel,v3] fftools: fix hwaccels option dump redundancy

Message ID 1586786856-14262-1-git-send-email-mypopydev@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,v3] fftools: fix hwaccels option dump redundancy | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Jun Zhao April 13, 2020, 2:07 p.m. UTC
From: Jun Zhao <barryjzhao@tencent.com>

When QSV is enabled in FFmpeg, the command "ffmpeg -hwaccels" shows a
duplicate entry in acceleration methods for QSV:

Hardware acceleration methods:
vaapi
qsv
drm
opencl
qsv

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
---
 fftools/ffmpeg_opt.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

mypopy@gmail.com April 14, 2020, 2:01 a.m. UTC | #1
On Mon, Apr 13, 2020 at 10:08 PM Jun Zhao <mypopydev@gmail.com> wrote:
>
> From: Jun Zhao <barryjzhao@tencent.com>
>
> When QSV is enabled in FFmpeg, the command "ffmpeg -hwaccels" shows a
> duplicate entry in acceleration methods for QSV:
>
> Hardware acceleration methods:
> vaapi
> qsv
> drm
> opencl
> qsv
>
> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> ---
>  fftools/ffmpeg_opt.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
> index 95001a9..93b3d96 100644
> --- a/fftools/ffmpeg_opt.c
> +++ b/fftools/ffmpeg_opt.c
> @@ -233,14 +233,11 @@ static void init_options(OptionsContext *o)
>  static int show_hwaccels(void *optctx, const char *opt, const char *arg)
>  {
>      enum AVHWDeviceType type = AV_HWDEVICE_TYPE_NONE;
> -    int i;
>
>      printf("Hardware acceleration methods:\n");
>      while ((type = av_hwdevice_iterate_types(type)) !=
>             AV_HWDEVICE_TYPE_NONE)
>          printf("%s\n", av_hwdevice_get_type_name(type));
> -    for (i = 0; hwaccels[i].name; i++)
> -        printf("%s\n", hwaccels[i].name);
>      printf("\n");
>      return 0;
>  }
> @@ -936,8 +933,6 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
>                                 AV_HWDEVICE_TYPE_NONE)
>                              av_log(NULL, AV_LOG_FATAL, "%s ",
>                                     av_hwdevice_get_type_name(type));
> -                        for (i = 0; hwaccels[i].name; i++)
> -                            av_log(NULL, AV_LOG_FATAL, "%s ", hwaccels[i].name);
>                          av_log(NULL, AV_LOG_FATAL, "\n");
>                          exit_program(1);
>                      }
> --
> 2.7.4
>
Will apply, tks
diff mbox series

Patch

diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 95001a9..93b3d96 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -233,14 +233,11 @@  static void init_options(OptionsContext *o)
 static int show_hwaccels(void *optctx, const char *opt, const char *arg)
 {
     enum AVHWDeviceType type = AV_HWDEVICE_TYPE_NONE;
-    int i;
 
     printf("Hardware acceleration methods:\n");
     while ((type = av_hwdevice_iterate_types(type)) !=
            AV_HWDEVICE_TYPE_NONE)
         printf("%s\n", av_hwdevice_get_type_name(type));
-    for (i = 0; hwaccels[i].name; i++)
-        printf("%s\n", hwaccels[i].name);
     printf("\n");
     return 0;
 }
@@ -936,8 +933,6 @@  static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
                                AV_HWDEVICE_TYPE_NONE)
                             av_log(NULL, AV_LOG_FATAL, "%s ",
                                    av_hwdevice_get_type_name(type));
-                        for (i = 0; hwaccels[i].name; i++)
-                            av_log(NULL, AV_LOG_FATAL, "%s ", hwaccels[i].name);
                         av_log(NULL, AV_LOG_FATAL, "\n");
                         exit_program(1);
                     }