fftools/cmdutils: Don't access AV(In|Out)putformat.get_device_list
It is not part of the public API. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -2230,14 +2230,8 @@ static int print_device_sources(const AVInputFormat *fmt, AVDictionary *opts)
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
|
||||||
printf("Auto-detected sources for %s:\n", fmt->name);
|
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) {
|
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;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2260,14 +2254,8 @@ static int print_device_sinks(const AVOutputFormat *fmt, AVDictionary *opts)
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
|
||||||
printf("Auto-detected sinks for %s:\n", fmt->name);
|
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) {
|
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;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user