From patchwork Fri Oct 9 20:18:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 22799 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 0567F44B68D for ; Fri, 9 Oct 2020 23:19:10 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DA1EB68B9FC; Fri, 9 Oct 2020 23:19:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4883E68B9BF for ; Fri, 9 Oct 2020 23:19:03 +0300 (EEST) Received: by mail-qt1-f180.google.com with SMTP id z33so5072700qth.8 for ; Fri, 09 Oct 2020 13:19:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=nH2UV9qSV//mMsG849yjix4I4uQh40L23eb6dT/T3Yc=; b=D4APyqiUNWtXq/5IZmApLVV8wtvKPfrJ2YEU9vC6qVA76nm5c9eWmcrHe+C8GrxqV2 yhboiJtaTldYkeDs75X7XgoWrA+xbWGnYE85diEqCOOGFR0PD8bjq39KodEuJmDbYMAE KAkpZ4pfYrDckkwYjHDFXLzISS+J6koxIV5uuiIjMqsVdeWb1NkfzjuDwmOW6rnZ/2QG anti6cx3CRwJaGcsFBHJw4CDxWbCfM4DeWWQ8jDh8yUEb22nf+1B3bcSBS7J0WQdWVWb sgjeLVaATpxjq7AwD9YybID6iSrmmzd+drYps6jrco1Na6lZIpxcPJ5vGXzsN96d/gEi hvwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=nH2UV9qSV//mMsG849yjix4I4uQh40L23eb6dT/T3Yc=; b=k18IYwrT5YjYoF8RmbdIShJ/5fvKhkbKzPSjuE6+oXubmMCdhwrie8tQs9XCwqZa4G uwqoZvcR6aEGrbKXsOHM9ZFDDGFw7Y4RKTN8A3AhQQieDChfq1+qUqQZguP5JfZurNfN Vc6+n2BAl1TF6jTtzvdn7rMOdtBtb+Y/v5qTlUKGCU/vBaVbWamOMjauLiaqHisccb1G 2nEwk0xcthEbzEGaYv6T0iivJeqRfu/qCjXcg0rXwuYwLhQL8ljsJIYBg5jAersUaPLL fwMvPVtmDlyjc1RxIWTCpjwcgl3Vh8ljuXVarXDqrxXh3yi7rPsdWzNpvSF5envWgUiQ Ri7A== X-Gm-Message-State: AOAM5321YatLKbfTq+uma7fVejGghYlY474cM5sA55yaKxZT6SfteHyh AadcT1wKK96kNRbrv7i5A/oJvmzmD+rvwQ== X-Google-Smtp-Source: ABdhPJz+HWzn0ooQY2Zb6IofX+rxV/LQFYgEsDcbhDV4W0GBmgOpaWtmzQj3arwRV4HSHfhwGsLUZQ== X-Received: by 2002:ac8:cc7:: with SMTP id o7mr15917887qti.9.1602274741095; Fri, 09 Oct 2020 13:19:01 -0700 (PDT) Received: from localhost.localdomain ([181.23.78.153]) by smtp.gmail.com with ESMTPSA id o47sm7146591qtk.21.2020.10.09.13.18.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 13:19:00 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Oct 2020 17:18:09 -0300 Message-Id: <20201009201811.10710-1-jamrial@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] avdevice/alldevices: stop using deprecated linked list API X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: James Almer --- 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)) + break; + } + } + + do { + fmt = indev_list[i++]; + if (!fmt) + break; + pc = fmt->priv_class; + if (!pc) + continue; + category = pc->category; + } while (category != c1 && category != c2); + return (AVInputFormat *)fmt; +} + +static void *next_output(AVOutputFormat *prev, AVClassCategory c2) +{ + const AVClass *pc; + const AVClassCategory c1 = AV_CLASS_CATEGORY_DEVICE_OUTPUT; + AVClassCategory category = AV_CLASS_CATEGORY_NA; + const AVOutputFormat *fmt = NULL; + int i = 0; + + if (prev) { + while (fmt = outdev_list[i]) { + i++; + if (av_match_name(prev->name, fmt->name)) + break; + } + } + + do { + fmt = outdev_list[i++]; + if (!fmt) + break; + pc = fmt->priv_class; + if (!pc) + continue; + category = pc->category; + } while (category != c1 && category != c2); + return (AVOutputFormat *)fmt; +} + +AVInputFormat *av_input_audio_device_next(AVInputFormat *d) +{ + return next_input(d, AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT); +} + +AVInputFormat *av_input_video_device_next(AVInputFormat *d) +{ + return next_input(d, AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT); +} + +AVOutputFormat *av_output_audio_device_next(AVOutputFormat *d) +{ + return next_output(d, AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT); +} + +AVOutputFormat *av_output_video_device_next(AVOutputFormat *d) +{ + return next_output(d, AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT); +} diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 3d03d89f04..ec84d3b990 100644 --- a/libavdevice/avdevice.c +++ b/libavdevice/avdevice.c @@ -78,52 +78,6 @@ const char * avdevice_license(void) return &LICENSE_PREFIX FFMPEG_LICENSE[sizeof(LICENSE_PREFIX) - 1]; } -static void *device_next(void *prev, int output, - AVClassCategory c1, AVClassCategory c2) -{ - const AVClass *pc; - AVClassCategory category = AV_CLASS_CATEGORY_NA; - do { - if (output) { - if (!(prev = av_oformat_next(prev))) - break; - pc = ((AVOutputFormat *)prev)->priv_class; - } else { - if (!(prev = av_iformat_next(prev))) - break; - pc = ((AVInputFormat *)prev)->priv_class; - } - if (!pc) - continue; - category = pc->category; - } while (category != c1 && category != c2); - return prev; -} - -AVInputFormat *av_input_audio_device_next(AVInputFormat *d) -{ - return device_next(d, 0, AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT, - AV_CLASS_CATEGORY_DEVICE_INPUT); -} - -AVInputFormat *av_input_video_device_next(AVInputFormat *d) -{ - return device_next(d, 0, AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, - AV_CLASS_CATEGORY_DEVICE_INPUT); -} - -AVOutputFormat *av_output_audio_device_next(AVOutputFormat *d) -{ - return device_next(d, 1, AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT, - AV_CLASS_CATEGORY_DEVICE_OUTPUT); -} - -AVOutputFormat *av_output_video_device_next(AVOutputFormat *d) -{ - return device_next(d, 1, AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, - AV_CLASS_CATEGORY_DEVICE_OUTPUT); -} - int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToDevMessageType type, void *data, size_t data_size) { From patchwork Fri Oct 9 20:18:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 22801 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 53E7A44A118 for ; Fri, 9 Oct 2020 23:25:40 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3B7E568BA1D; Fri, 9 Oct 2020 23:25:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B076D68BA0C for ; Fri, 9 Oct 2020 23:25:33 +0300 (EEST) Received: by mail-qk1-f193.google.com with SMTP id v123so11922836qkd.9 for ; Fri, 09 Oct 2020 13:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=68ycgKC2/ozu7Z1smYATDJ/AlyudbPimZDFh1zhsy+I=; b=RW1CEOs2RopdVATjMAPLkCCK70RxA7sUmoldbVx2Nw8tHGtUTmSywXi9ChCX64h80j Hi0EgLnLHVSTDUtoxhgzT89pBBq9LJYzteXBoGzyR7K2KQdGLjyvUlB4rnlF+D0jwneM aDLjD7LSytkqiGjDTYqV5gD5GMDMMENUnWDXMD/5PYJIB86c/jNZhNNodavlijPRKR2S egl9Jug8ZIMsX1/23jmWTGoFHdhdaG62KKEvjxwxkmg3g5mgDex+/s7bbtDuYCClh/4t wrhpdM7ulRr7YisFLVZw6MPL0TftlDhJkj8YuUWBIjMoZTI9twX+dsMy7grD4kiUGrlo TkVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=68ycgKC2/ozu7Z1smYATDJ/AlyudbPimZDFh1zhsy+I=; b=M7cbAEq0LcpYXw+t/g5GPirrsnSHJ890+bJ1TnfOz2a43HRy2esBM7ZbAJyQllwjut obLYoMdU19PvDfYAG+stf7FCy4uDUtJbuYr3TmwxdqqbAYRvhyAUPeHApfD8hCTgMU86 PJfQfc4tJI5OuBWNYV1Fc0Y2DV5o8RtFeN5L3c//DJaN7HJH4pB6yzJ2MvI/16hVRerK uEmRM4TbwWJSTqbLbcFS+0yRQh6CKJc0XVeZeYQcuNaRn6s4+cAOww4v/4giRUm0NMGp ilHnNTTHlUoESbxpNWpGfqMYckXInNwQSUT0LrRQ14i+yHvwDYB5CmSC641BehcshcpX Bz4w== X-Gm-Message-State: AOAM5301YX8xRK1ryFUAecm+S+FpSTpe0uXouXKxAzsk6oX27gsLlkvK /WAxrrbBYskNHQdQEvX0q/QY6VfaxqAZgw== X-Google-Smtp-Source: ABdhPJyrlkkv48zb895XvJR0Q4ZmFx3dQZkGOKIgFOWCZdJNC2FQWUlz9C3TwTxjD0F7r3xWN87S/A== X-Received: by 2002:ac8:f6d:: with SMTP id l42mr15969750qtk.367.1602274742553; Fri, 09 Oct 2020 13:19:02 -0700 (PDT) Received: from localhost.localdomain ([181.23.78.153]) by smtp.gmail.com with ESMTPSA id o47sm7146591qtk.21.2020.10.09.13.19.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 13:19:01 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Oct 2020 17:18:10 -0300 Message-Id: <20201009201811.10710-2-jamrial@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201009201811.10710-1-jamrial@gmail.com> References: <20201009201811.10710-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] avdevice: add new API for iterating input and output devices X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" And deprecate the linked list based one. Based on a patch by Josh de Kock. Signed-off-by: James Almer --- doc/APIchanges | 5 +++++ libavdevice/alldevices.c | 22 ++++++++++++++++++++++ libavdevice/avdevice.h | 36 ++++++++++++++++++++++++++++++++++++ libavdevice/version.h | 7 +++++-- 4 files changed, 68 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index f2830968bb..ae1f9ace77 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,11 @@ libavutil: 2017-10-21 API changes, most recent first: +2020-10-xx - xxxxxxxxxx - lavd 58.12.100 - avdevice.h + Deprecate use of av_input_audio_device_next(), av_input_video_device_next(), + av_output_audio_device_next(), av_output_video_device_next(). + Add av_indev_iterate(), and av_outdev_iterate(). + 2020-xx-xx - xxxxxxxxxx - lavu 56.60.100 - buffer.h Add a av_buffer_replace() convenience function. diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index 4137f60109..2f17e9f33b 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -63,11 +63,32 @@ extern AVInputFormat ff_libdc1394_demuxer; #include "libavdevice/outdev_list.c" #include "libavdevice/indev_list.c" +const AVOutputFormat *av_outdev_iterate(void **opaque) +{ + uintptr_t i = (uintptr_t)*opaque; + const AVOutputFormat *f = outdev_list[i]; + + if (f) + *opaque = (void*)(i + 1); + return f; +} + +const AVInputFormat *av_indev_iterate(void **opaque) +{ + uintptr_t i = (uintptr_t)*opaque; + const AVInputFormat *f = indev_list[i]; + + if (f) + *opaque = (void*)(i + 1); + return f; +} + void avdevice_register_all(void) { avpriv_register_devices(outdev_list, indev_list); } +#if FF_API_DEVICE_NEXT static void *next_input(AVInputFormat *prev, AVClassCategory c2) { const AVClass *pc; @@ -143,3 +164,4 @@ AVOutputFormat *av_output_video_device_next(AVOutputFormat *d) { return next_output(d, AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT); } +#endif diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h index ee9462480e..388f93c155 100644 --- a/libavdevice/avdevice.h +++ b/libavdevice/avdevice.h @@ -70,13 +70,39 @@ const char *avdevice_license(void); */ void avdevice_register_all(void); +/** + * Iterate over all registered output devices. + * + * @param opaque a pointer where libavdevice will store the iteration state. Must + * point to NULL to start the iteration. + * + * @return the next registered output device or NULL when the iteration is + * finished + */ +const AVOutputFormat *av_outdev_iterate(void **opaque); + +/** + * Iterate over all registered input devices. + * + * @param opaque a pointer where libavdevice will store the iteration state. Must + * point to NULL to start the iteration. + * + * @return the next registered input device or NULL when the iteration is + * finished + */ +const AVInputFormat *av_indev_iterate(void **opaque); + +#if FF_API_DEVICE_NEXT /** * Audio input devices iterator. * * If d is NULL, returns the first registered input audio/video device, * if d is non-NULL, returns the next registered input audio/video device after d * or NULL if d is the last one. + * + * @deprecated use av_indev_iterate() instead */ +attribute_deprecated AVInputFormat *av_input_audio_device_next(AVInputFormat *d); /** @@ -85,7 +111,10 @@ AVInputFormat *av_input_audio_device_next(AVInputFormat *d); * If d is NULL, returns the first registered input audio/video device, * if d is non-NULL, returns the next registered input audio/video device after d * or NULL if d is the last one. + * + * @deprecated use av_indev_iterate() instead */ +attribute_deprecated AVInputFormat *av_input_video_device_next(AVInputFormat *d); /** @@ -94,7 +123,10 @@ AVInputFormat *av_input_video_device_next(AVInputFormat *d); * If d is NULL, returns the first registered output audio/video device, * if d is non-NULL, returns the next registered output audio/video device after d * or NULL if d is the last one. + * + * @deprecated use av_outdev_iterate() instead */ +attribute_deprecated AVOutputFormat *av_output_audio_device_next(AVOutputFormat *d); /** @@ -103,8 +135,12 @@ AVOutputFormat *av_output_audio_device_next(AVOutputFormat *d); * If d is NULL, returns the first registered output audio/video device, * if d is non-NULL, returns the next registered output audio/video device after d * or NULL if d is the last one. + * + * @deprecated use av_outdev_iterate() instead */ +attribute_deprecated AVOutputFormat *av_output_video_device_next(AVOutputFormat *d); +#endif typedef struct AVDeviceRect { int x; /**< x coordinate of top left corner */ diff --git a/libavdevice/version.h b/libavdevice/version.h index e3aca9e3d2..7f5f46e428 100644 --- a/libavdevice/version.h +++ b/libavdevice/version.h @@ -28,8 +28,8 @@ #include "libavutil/version.h" #define LIBAVDEVICE_VERSION_MAJOR 58 -#define LIBAVDEVICE_VERSION_MINOR 11 -#define LIBAVDEVICE_VERSION_MICRO 102 +#define LIBAVDEVICE_VERSION_MINOR 12 +#define LIBAVDEVICE_VERSION_MICRO 100 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ LIBAVDEVICE_VERSION_MINOR, \ @@ -46,5 +46,8 @@ * dropped at a future version bump. The defines themselves are not part of * the public API and may change, break or disappear at any time. */ +#ifndef FF_API_DEVICE_NEXT +#define FF_API_DEVICE_NEXT (LIBAVDEVICE_VERSION_MAJOR < 60) +#endif #endif /* AVDEVICE_VERSION_H */ From patchwork Fri Oct 9 20:18:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 22800 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 8D9B044346D for ; Fri, 9 Oct 2020 23:25:10 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6C91368BA0A; Fri, 9 Oct 2020 23:25:10 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6B62668B9DB for ; Fri, 9 Oct 2020 23:25:04 +0300 (EEST) Received: by mail-qk1-f194.google.com with SMTP id c2so11898566qkf.10 for ; Fri, 09 Oct 2020 13:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=6EsNZODTKRQOFYAaMCm+0j6SQo1ZzN+FUVD/Dl/2uVw=; b=W1qCK34udg9+zntgYvhdNOs5Mew+3Qq+T//8EnitaOI/BqybOQ/O/xcLL4ztroIpwb 1jkmeDhrWYaTiwru5nKiKonvQRjd+lKnIb0ZYvf4A6jTYEANZY5aR7Pn2oxvC23qu8Bz SNEMMAmWWn24RIwHP8X84dLPA7t2gjKraJX7SPRynM0C2rFws+o/uu1fyeEXCyZvwWLz HhhCOKE1WFBDD6dwQBeFmmzIR1+eHGXmNKmnqSEPNNcmcOKX/7Dpxs3+FR5cDHylnKQi wTQc04Ma7PV+3xQaxgsD55jHAy4ov/LYo6PfToAIfPei9Oev74RsOtpUgJwlRxasewZs gpfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6EsNZODTKRQOFYAaMCm+0j6SQo1ZzN+FUVD/Dl/2uVw=; b=FNr+ixm6V+Y6+Zlm3mlRhlPsIY4C6ZUVNftjFAClj/8NhkfNVBoFBrjH9jiwvCuBDW uSCQ+tKCoJCnO7Sy5CfGhR5ErKLbWzwbO5PkmySw5Tq9EHKgbUWHoaXhJt/xI8MuYuJ+ vwPLLDARvT1U7jQ/Hyyv2+izxKDygYCXLTFmiOXc29ky2S4DApzzTQ0jVV4Dc5oHUVIh /T+QJplax1XbbARI9Dsm6WfAPv7EZ+lU1I/K2l+yd5YlR8eWSft6SXFoqwEqQ65bq5db my2oUNGFOmnxEmGaCP7eUSi4nef84rGgnn8LqNs2yndVYv8f51vC8hqowCq334u/VsPG ZKVg== X-Gm-Message-State: AOAM531WnSMJ12E50XdOfwPzl8OcbZ83lQS2+SlWynItthD4BEQVfBCx PNSElnl5pgjNmGYWi+NvK6EF7zrbiw+4kw== X-Google-Smtp-Source: ABdhPJx1zHvTU3HT/cYjulYwbfLigaz5GBBif5VnCquw0h/tNX8x+vHtQaTIE8cQSO8HKxoI2fiRdA== X-Received: by 2002:aed:2e05:: with SMTP id j5mr14944686qtd.94.1602274743954; Fri, 09 Oct 2020 13:19:03 -0700 (PDT) Received: from localhost.localdomain ([181.23.78.153]) by smtp.gmail.com with ESMTPSA id o47sm7146591qtk.21.2020.10.09.13.19.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 13:19:03 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Oct 2020 17:18:11 -0300 Message-Id: <20201009201811.10710-3-jamrial@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201009201811.10710-1-jamrial@gmail.com> References: <20201009201811.10710-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] cmdutils: use the new device iteration API to list devices X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: James Almer --- fftools/cmdutils.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 88fdbeaf1e..83989b8190 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -2302,7 +2302,8 @@ static int show_sinks_sources_parse_arg(const char *arg, char **dev, AVDictionar int show_sources(void *optctx, const char *opt, const char *arg) { - AVInputFormat *fmt = NULL; + const AVInputFormat *fmt = NULL; + void *fmt_iter = NULL; char *dev = NULL; AVDictionary *opts = NULL; int ret = 0; @@ -2314,17 +2315,7 @@ int show_sources(void *optctx, const char *opt, const char *arg) goto fail; do { - fmt = av_input_audio_device_next(fmt); - if (fmt) { - if (!strcmp(fmt->name, "lavfi")) - continue; //it's pointless to probe lavfi - if (dev && !av_match_name(dev, fmt->name)) - continue; - print_device_sources(fmt, opts); - } - } while (fmt); - do { - fmt = av_input_video_device_next(fmt); + fmt = av_indev_iterate(&fmt_iter); if (fmt) { if (dev && !av_match_name(dev, fmt->name)) continue; @@ -2340,7 +2331,8 @@ int show_sources(void *optctx, const char *opt, const char *arg) int show_sinks(void *optctx, const char *opt, const char *arg) { - AVOutputFormat *fmt = NULL; + const AVInputFormat *fmt = NULL; + void *fmt_iter = NULL; char *dev = NULL; AVDictionary *opts = NULL; int ret = 0; @@ -2352,15 +2344,7 @@ int show_sinks(void *optctx, const char *opt, const char *arg) goto fail; do { - fmt = av_output_audio_device_next(fmt); - if (fmt) { - if (dev && !av_match_name(dev, fmt->name)) - continue; - print_device_sinks(fmt, opts); - } - } while (fmt); - do { - fmt = av_output_video_device_next(fmt); + fmt = av_outdev_iterate(&fmt_iter); if (fmt) { if (dev && !av_match_name(dev, fmt->name)) continue; From patchwork Sat Oct 10 03:45:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 22824 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id CB0BE4497F7 for ; Sat, 10 Oct 2020 06:45:51 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A866568BA0A; Sat, 10 Oct 2020 06:45:51 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0063568BA07 for ; Sat, 10 Oct 2020 06:45:44 +0300 (EEST) Received: by mail-qt1-f182.google.com with SMTP id c5so9704023qtw.3 for ; Fri, 09 Oct 2020 20:45:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=IZPHDcnRHbDDjbJF6GTE5RaG57YvzPdARJh9ZBRgNqA=; b=txSaSYXPtX3b2LVxW2TsLxYN094UrYBqwvuXRbRjodMbyOVAoQxHdEY3G40iD7LlZY ODoVZjwz1YPd49nXSI8pRS0s68JTvX95MArgg+dwFmYJ5TqRe9XN8S2f47DkdbsFqNUs suqjrd317PyXPDkYy3vFtfRkwdeBbV4dHcF0iyxmMV1eIEpwOzZDAvVD6xEVAObcxyaC KUueCrnqWTZACNGIUgHTl/9rNqZJTVQ9V9CZ++OwwvvrLe6eEK5Zrb3oeF/2j8wZsbKy J0Glvo8pWNaJkV9FG0SPS2GPDSxxGpDt6ho+tLBsHa/FkdJkZQZ080fqj1KLhIQzttx/ ZzvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IZPHDcnRHbDDjbJF6GTE5RaG57YvzPdARJh9ZBRgNqA=; b=G8rdPiSclO2DhGJBAvZvU7z5lf9KqEcS1GaA6VEXXudJJZ/RvseSTa2146A2s8Qh0C VWzX4iYEbxUMSu+CP3sFoL2msvLnYkoxDfvUcoqKLZgM0D563+Heh52CA9ZGB2CP7NMw lcvlGprGyLWj5CDL33be/tGbiWZ1GJdPNXkyxc5P0SiJ2qOEP0G9R8O6u0VUBNmC4+8h Iy4IPovq0Parv6wELwLWwElUZ2s2J56MvGhCAzKC1kovUEibFUR485co6cf97VdzKIr8 OmePr0OJ7hxIfc1mz0FZkx23URVxf2Id8vkjixittBK8kXdWdYZ4ZqaEPednE2nyEh4H rhIw== X-Gm-Message-State: AOAM532dn1Bn+jjcc2oWyt3/Eb//hEMR1hol34CSXUTMYB5xB8A4da2z 8yw1aQahLoO9Aa+fg0wrmB/0b9nZkQSyQQ== X-Google-Smtp-Source: ABdhPJwNtbOV0N5YGKfPAqfxu99Xs5nV8KHfoh8kNaBg9wcYcSVpuhz4T0wZJAWk874oFfeXWHWNJQ== X-Received: by 2002:aed:362a:: with SMTP id e39mr1054215qtb.121.1602301542951; Fri, 09 Oct 2020 20:45:42 -0700 (PDT) Received: from localhost.localdomain ([181.23.78.153]) by smtp.gmail.com with ESMTPSA id r129sm7578517qka.32.2020.10.09.20.45.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 20:45:42 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Oct 2020 00:45:27 -0300 Message-Id: <20201010034527.21826-1-jamrial@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201009201811.10710-1-jamrial@gmail.com> References: <20201009201811.10710-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/6] avformat/options: use the iterate API in format_child_class_next() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: James Almer --- libavformat/options.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/libavformat/options.c b/libavformat/options.c index 3160904fda..59e0389815 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -55,35 +55,38 @@ static void *format_child_next(void *obj, void *prev) } #if FF_API_CHILD_CLASS_NEXT -FF_DISABLE_DEPRECATION_WARNINGS static const AVClass *format_child_class_next(const AVClass *prev) { - AVInputFormat *ifmt = NULL; - AVOutputFormat *ofmt = NULL; + const AVInputFormat *ifmt = NULL; + const AVOutputFormat *ofmt = NULL; + void *ifmt_iter = NULL, *ofmt_iter = NULL; if (!prev) return &ff_avio_class; - while ((ifmt = av_iformat_next(ifmt))) + while ((ifmt = av_demuxer_iterate(&ifmt_iter))) if (ifmt->priv_class == prev) break; - if (!ifmt) - while ((ofmt = av_oformat_next(ofmt))) + if (!ifmt) { + ifmt_iter = NULL; + while ((ofmt = av_muxer_iterate(&ofmt_iter))) if (ofmt->priv_class == prev) break; - if (!ofmt) - while (ifmt = av_iformat_next(ifmt)) + } + if (!ofmt) { + ofmt_iter = NULL; + while ((ifmt = av_demuxer_iterate(&ifmt_iter))) if (ifmt->priv_class) return ifmt->priv_class; + } - while (ofmt = av_oformat_next(ofmt)) + while ((ofmt = av_muxer_iterate(&ofmt_iter))) if (ofmt->priv_class) return ofmt->priv_class; return NULL; } -FF_ENABLE_DEPRECATION_WARNINGS #endif enum { From patchwork Sat Oct 10 03:45:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 22825 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id CF50244A0CB for ; Sat, 10 Oct 2020 06:46:16 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B645668BA31; Sat, 10 Oct 2020 06:46:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 68EE568B6E2 for ; Sat, 10 Oct 2020 06:46:10 +0300 (EEST) Received: by mail-qt1-f194.google.com with SMTP id a9so9680311qto.11 for ; Fri, 09 Oct 2020 20:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=nPcK7GpfOvotfgrbyCo5yASNZSPdfxAKSnPIJP7rQN0=; b=aDopR3BY4ApAM4Py41IW8CH0OuJysbIRr3ZXmFIsELR+93DFltSrwXQdFQKAxU/GmU dZB3ZxDlPyGbiauSmM+IuADMoe1MGXXbtO/ZAgdmqiDlboptKkPcEaZT8IggBqvM8XDq Esnl9LKDvoacTXqKwwaCXSlF4j34BJ0jVEGD5lEfY0DKcs5pTvYQHvzuyQ1/R4owpTlo QDliAS6ovIL3Utq0O3N5i1CA91ZwsJ4XKaljd2ku8hFrnlLSv2j3v/ZO9TXXfM9VzVA3 Q7qzW5SBqAiQOQ9uYDHF5XRkx+5/0o92IYj6ZWtKIO0K4K7si9VkjPnzxOtGqGWolSYR 91qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nPcK7GpfOvotfgrbyCo5yASNZSPdfxAKSnPIJP7rQN0=; b=Utxq1U4ZuooQe4EXXXzxW3v6zRRew4jJL67AkD8KjbSOqQiBeldEl5dxDAQCkZcJG9 NbzTZtaj933Pfs1L57U7t+nS1l+5S1HY4eVsX+nDd3aJj11pUL+50w1y+vlEbVYVDHsX kjuei3jXJiHNFcKh0O5jn3hr8z5voMDSU0whvR7azi4xT8TGIXBrr8MYV9DpV6eNvIra Cv5gsGoQOdvmuYvVraMBr3WYM2ldTyapIEcE1WWOrpwLcZ4plnzsRFEgzA2q5eiyXABS GSKw8oz4mnPuyuNSRumj/SIvoY/cPGWX8H1Z2XWPdenVwFVsYzxg3roW2o2OV88QeNF+ G3cg== X-Gm-Message-State: AOAM531Sm5ZaSK7Kcs4iOLnBV72Ybtj0p+VIj0XCf64AlU9aFw4wdtDE nImJtQXjw5E+Uy7hGtVB+JFbaRGK/vujHg== X-Google-Smtp-Source: ABdhPJwV5CH+0U6wbNKdi/c8jGzYy/kJRbQ18ULte1xHfS4vH3fFqXKUQsXxEW1H9u7j7+2nqqBPNg== X-Received: by 2002:ac8:5acb:: with SMTP id d11mr1033367qtd.161.1602301568944; Fri, 09 Oct 2020 20:46:08 -0700 (PDT) Received: from localhost.localdomain ([181.23.78.153]) by smtp.gmail.com with ESMTPSA id s10sm7584316qkg.61.2020.10.09.20.46.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 20:46:08 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Oct 2020 00:45:52 -0300 Message-Id: <20201010034552.21874-1-jamrial@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201009201811.10710-1-jamrial@gmail.com> References: <20201009201811.10710-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/6] tools/target_dem_fuzzer: switch to the iterate API X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: James Almer --- tools/target_dem_fuzzer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/target_dem_fuzzer.c b/tools/target_dem_fuzzer.c index eefb5c5fa3..10082993fe 100644 --- a/tools/target_dem_fuzzer.c +++ b/tools/target_dem_fuzzer.c @@ -105,8 +105,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { int ret; if (!c) { - av_register_all(); - avcodec_register_all(); av_log_set_level(AV_LOG_PANIC); c=1; } @@ -132,15 +130,17 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { filesize = bytestream2_get_le64(&gbc) & 0x7FFFFFFFFFFFFFFF; if ((flags & 2) && strlen(filename) < sizeof(filename) / 2) { - AVInputFormat *avif = NULL; + const AVInputFormat *avif = NULL; + void *avif_iter = NULL; int avif_count = 0; - while ((avif = av_iformat_next(avif))) { + while ((avif = av_demuxer_iterate(&avif_iter))) { if (avif->extensions) avif_count ++; } avif_count = bytestream2_get_le32(&gbc) % avif_count; - while ((avif = av_iformat_next(avif))) { + avif_iter = NULL; + while ((avif = av_demuxer_iterate(&avif_iter))) { if (avif->extensions) if (!avif_count--) break; From patchwork Sat Oct 10 03:46:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 22826 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id D70F944A0CB for ; Sat, 10 Oct 2020 06:46:38 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BB0C168BA37; Sat, 10 Oct 2020 06:46:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f66.google.com (mail-qv1-f66.google.com [209.85.219.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3A41968BA07 for ; Sat, 10 Oct 2020 06:46:32 +0300 (EEST) Received: by mail-qv1-f66.google.com with SMTP id w5so5797440qvn.12 for ; Fri, 09 Oct 2020 20:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=mZH8enAEHMRoX2miV15n64CFwWrjoYZwyh41xKtjmJ4=; b=lv+A2VGrxhwc4pqkstHty4BdkUMa2vEOhqNwEXyGG+M0tpvLFVcZhX7wEvsSxTOA7E xbfKSJIuNJij04xyN4azeg1OSDqj8yX3ilva/rlW7fkHFLk0hDhrEsat6K5AurDEJEJh DaTpuHLmqX5nE4CunNnBcVY+DZdPcLls6gYUUVDS03tkSIrLQ600GOdONKSMTtjw5cx4 +CpSmqCcxyGqv4Nnx6zPavRutprbnMiGk9oLvHy6FHLymF/rWzemsgdJ6xgaFOetKw0q IEVUy7oa617vFez/WmHbxdzP1eYt58thq9ihe6gIQeNwgArwnpHO1MLubAuZOnPFyiQw 0b+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mZH8enAEHMRoX2miV15n64CFwWrjoYZwyh41xKtjmJ4=; b=IZidUwMqS/f8/ubhx4HVXGHmiwtxjYTUgmFt3taOdhQQUxHuCpSdlGsMxT9FL6IFxv Dk2m3I+Arr8SRuXven2fnWiV5DQPSGRyh7Zeh3qWTxgaFJQyTRmRHNRI1P3i+ajPm7gL z7SCTv0FX+noL7Ui3wnleLfBBTFzlkepDk9b3969Us/kkviVyxCsvQlThBcCs8UpCyOc E7zncg7GEzNElw3kpo1HwupxOndjgTmMp1r8T5n1ruTDmNmB7tNrRt0Ix5R6H84jK49P TDGDahtZ99pqcecdHbDvis6JZ7FEeNG2Cu+c8rhdunxDwbQWct0bJ0aRXyEt7Jm7KaVb EYIw== X-Gm-Message-State: AOAM532QiIXIPy7sFUJEl9lgm1WmeGdhBx34KSaTuhOqBNVNT6lsN3Sv QjVy9SlQ5ccg0p8vN5hclP+euQ9VTEGouQ== X-Google-Smtp-Source: ABdhPJyy3eZqTdrRz5aRu69jttH3gDQiCRlrw8kd6JY6+eBnBdS3ghFmtLidszUAZHqZmBxHAEbFbg== X-Received: by 2002:a0c:ee6a:: with SMTP id n10mr15342063qvs.45.1602301590435; Fri, 09 Oct 2020 20:46:30 -0700 (PDT) Received: from localhost.localdomain ([181.23.78.153]) by smtp.gmail.com with ESMTPSA id c2sm7753802qkb.44.2020.10.09.20.46.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 20:46:29 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Oct 2020 00:46:17 -0300 Message-Id: <20201010034617.21922-1-jamrial@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201009201811.10710-1-jamrial@gmail.com> References: <20201009201811.10710-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/6] tools/target_dec_fuzzer: remove calls to avcodec_register*() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" They are no-ops. Signed-off-by: James Almer --- tools/target_dec_fuzzer.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 7bea736fcf..39d4bb5647 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -118,17 +118,14 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { #define DECODER_SYMBOL(CODEC) DECODER_SYMBOL0(CODEC) extern AVCodec DECODER_SYMBOL(FFMPEG_DECODER); codec_list[0] = &DECODER_SYMBOL(FFMPEG_DECODER); - avcodec_register(&DECODER_SYMBOL(FFMPEG_DECODER)); #if FFMPEG_DECODER == tiff || FFMPEG_DECODER == tdsc extern AVCodec DECODER_SYMBOL(mjpeg); codec_list[1] = &DECODER_SYMBOL(mjpeg); - avcodec_register(&DECODER_SYMBOL(mjpeg)); #endif c = &DECODER_SYMBOL(FFMPEG_DECODER); #else - avcodec_register_all(); c = AVCodecInitialize(FFMPEG_CODEC); // Done once. #endif av_log_set_level(AV_LOG_PANIC);