Message ID | AM7PR03MB6660782CB4C1220BAD5507A18FCD9@AM7PR03MB6660.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | 23b83adb6d28f249c846f2054f96712b7c7994b2 |
Headers | show |
Series | [FFmpeg-devel,1/2] fftools/cmdutils: Don't access AV(In|Out)putformat.get_device_list | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
Andreas Rheinhardt: > It is not part of the public API. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > --- > fftools/cmdutils.c | 16 ++-------------- > 1 file changed, 2 insertions(+), 14 deletions(-) > > diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c > index 2dd035a7cf..69c39479f5 100644 > --- a/fftools/cmdutils.c > +++ b/fftools/cmdutils.c > @@ -2234,14 +2234,8 @@ static int print_device_sources(const AVInputFormat *fmt, AVDictionary *opts) > return AVERROR(EINVAL); > > printf("Auto-detected sources for %s:\n", fmt->name); > - if (!fmt->get_device_list) { > - ret = AVERROR(ENOSYS); > - printf("Cannot list sources. Not implemented.\n"); > - goto fail; > - } > - > if ((ret = avdevice_list_input_sources(fmt, NULL, opts, &device_list)) < 0) { > - printf("Cannot list sources.\n"); > + printf("Cannot list sources: %s\n", av_err2str(ret)); > goto fail; > } > > @@ -2264,14 +2258,8 @@ static int print_device_sinks(const AVOutputFormat *fmt, AVDictionary *opts) > return AVERROR(EINVAL); > > printf("Auto-detected sinks for %s:\n", fmt->name); > - if (!fmt->get_device_list) { > - ret = AVERROR(ENOSYS); > - printf("Cannot list sinks. Not implemented.\n"); > - goto fail; > - } > - > if ((ret = avdevice_list_output_sinks(fmt, NULL, opts, &device_list)) < 0) { > - printf("Cannot list sinks.\n"); > + printf("Cannot list sinks: %s\n", av_err2str(ret)); > goto fail; > } > > Will apply tomorrow unless there are objections. - Andreas
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 2dd035a7cf..69c39479f5 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -2234,14 +2234,8 @@ static int print_device_sources(const AVInputFormat *fmt, AVDictionary *opts) return AVERROR(EINVAL); printf("Auto-detected sources for %s:\n", fmt->name); - if (!fmt->get_device_list) { - ret = AVERROR(ENOSYS); - printf("Cannot list sources. Not implemented.\n"); - goto fail; - } - if ((ret = avdevice_list_input_sources(fmt, NULL, opts, &device_list)) < 0) { - printf("Cannot list sources.\n"); + printf("Cannot list sources: %s\n", av_err2str(ret)); goto fail; } @@ -2264,14 +2258,8 @@ static int print_device_sinks(const AVOutputFormat *fmt, AVDictionary *opts) return AVERROR(EINVAL); printf("Auto-detected sinks for %s:\n", fmt->name); - if (!fmt->get_device_list) { - ret = AVERROR(ENOSYS); - printf("Cannot list sinks. Not implemented.\n"); - goto fail; - } - if ((ret = avdevice_list_output_sinks(fmt, NULL, opts, &device_list)) < 0) { - printf("Cannot list sinks.\n"); + printf("Cannot list sinks: %s\n", av_err2str(ret)); goto fail; }
It is not part of the public API. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- fftools/cmdutils.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)