[FFmpeg-devel] [PATCH 1/3] avdevice/alldevices: stop using deprecated linked list API
Anton Khirnov
anton at khirnov.net
Wed Oct 14 16:48:15 EEST 2020
Quoting James Almer (2020-10-09 22:18:09)
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> libavdevice/alldevices.c | 76 ++++++++++++++++++++++++++++++++++++++++
> libavdevice/avdevice.c | 46 ------------------------
> 2 files changed, 76 insertions(+), 46 deletions(-)
>
> diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
> index a6f68dd3bb..4137f60109 100644
> --- a/libavdevice/alldevices.c
> +++ b/libavdevice/alldevices.c
> @@ -67,3 +67,79 @@ void avdevice_register_all(void)
> {
> avpriv_register_devices(outdev_list, indev_list);
> }
> +
> +static void *next_input(AVInputFormat *prev, AVClassCategory c2)
> +{
> + const AVClass *pc;
> + const AVClassCategory c1 = AV_CLASS_CATEGORY_DEVICE_INPUT;
> + AVClassCategory category = AV_CLASS_CATEGORY_NA;
> + const AVInputFormat *fmt = NULL;
> + int i = 0;
> +
> + if (prev) {
> + while (fmt = indev_list[i]) {
> + i++;
> + if (av_match_name(prev->name, fmt->name))
Why not compare the AVInputFormat pointers directly?
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list