From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 3A77E4290F for ; Sat, 7 May 2022 11:33:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C2B4968B498; Sat, 7 May 2022 14:30:29 +0300 (EEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073102.outbound.protection.outlook.com [40.92.73.102]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E2CB368B48D for ; Sat, 7 May 2022 14:30:23 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NCXx2kLrwa4ARTfxEedB+yTQSvsnk8oH/ddM4Ehw7O5gOof6e12nKcMUCGb8dGS91EQdBhXNOwKWCF/lEGCRAQ+xgxXPJ5+nPQ6MZNtPSPMBOnFe2yGnYu2ukcV8CIABHUSw90Pq6peD0ZiNdRSTFT0B+zCLP5WJREgZR564dPjfw6m8H/qGitf8neQIGK/HlMjF7Apr04RI6PC2XuYKuJcfVNgQPxQu3RwtInLAF7sa4invvtOmSM0OIquyymzGcB14mtfIDsIFYkoilrMv7azYiGobcj88sS4kp+qJ9+Y1LLzveO9SlZLm1TamDJxpymuGRRYW1XKM+kGvSYcbMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Uz9ZGuxgconxbK8WPdCYcMGADefxK0N6Y2Gbsk/27lk=; b=b04PtYxN7cUpKR+CY0nSWiAuTH1PNcEaHz8JDOd+Duk7g/BEXvhhry8BCf4c4lIvn7UndzJfIzX4zQy3wDkK/JuvNbx2ljkG94r/0h/8utUh+VVpWLFhf3+SQcAA06etVyRKYlwfP/T20ov3aGZFyGJuGmydEWujH3lA5a0F5iH6fLVIZg6ixd9yGK60aIFbRhoT5CWd+U63uJg61+D6roaq+2fpcMHoCtVBZNI0IudVjgp9UVcuiZM5iiF6thg2LJGZuiYd2mshw/hMeaMZPhhgt/EF+KnsOGHNQ6WAl7lbeK+DyKKIq4ul0rw/ev+r50XpQiWdjOujGn2fJdsU0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Uz9ZGuxgconxbK8WPdCYcMGADefxK0N6Y2Gbsk/27lk=; b=DtVis6VG2IzK35sLy3Com14cxfNLF5g403XFiWbeZxc6G+x2cezwmKNWWTf3SkXrOAUf14/AfkFg3ilz4NusfBQoZfk5szU+E7BBob3YcmL53JeEF34B2M5PyI1MUCzxDAZl+P7THu426egl9ElT8to9y5l9BE1ZoYqkeupWbU+ammsBsjgYgwM/1nZkih9WsA2Yz+3LlqxxVtARNjXBsHvHsnB0ccL8DyGCsEcHaR3pFgmrB0FBBEFk766Cxtrtbp2O2hXFAWjwgctIegESrY44CqpEaQS5o0gkKuAXZhmD6YBbrk+CIKDNUG89anWwHXg9HyY8YWD8YHOhaY4CGw== Received: from AS8PR01MB7944.eurprd01.prod.exchangelabs.com (2603:10a6:20b:373::5) by DB6PR01MB3895.eurprd01.prod.exchangelabs.com (2603:10a6:6:4b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.24; Sat, 7 May 2022 11:30:22 +0000 Received: from AS8PR01MB7944.eurprd01.prod.exchangelabs.com ([fe80::1854:2c30:7ba1:c431]) by AS8PR01MB7944.eurprd01.prod.exchangelabs.com ([fe80::1854:2c30:7ba1:c431%6]) with mapi id 15.20.5206.024; Sat, 7 May 2022 11:30:22 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 7 May 2022 13:28:13 +0200 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [Z5INAQ92VHFSQ4+Jb2x2yErF25oY0YSl] X-ClientProxiedBy: ZRAP278CA0004.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::14) To AS8PR01MB7944.eurprd01.prod.exchangelabs.com (2603:10a6:20b:373::5) X-Microsoft-Original-Message-ID: <20220507112830.406162-26-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f5d6a825-0abd-4942-a74b-08da301cf858 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiRIovyFjHwHllp74iOQFItwK1ZQTqdVaaFuhc/uHE1Ca7SF8R1jQidxrhqUn/5oWanV3u46ZUZiaLR2I4NxutfwRSzmz2HwtmtfNcCRaCuvHUTJsuVmzY87rH+QoCGl7HtItx3qDfruhPjVqb0Z6IQyDgS2uRYU7O7Jt0pug3ptLmrcR8RN40ZGibFlKDnFjInk7nYP9SOqkImXApFuFgMh+qkGWrfwXDRp0tmVSHUJWapH9+UFRa5/LiEgW2IjfgTXpgUFn0pQQYfv75PoEDnQhF9cPZtvYz/Xu2X9edf9DhRyhPDfVWWXnwvEiZMRmJed9brMw36Cm7ypTQeG2KTtFg8a6bUiTpIitTj96zJgWl0wuZXY5DeBdyKYOiwt7jzKQT8iSU6NovqgwOhJg7JOdaI+Ilo/qSZVRQ290XO3youxiTVAkcnUB1mQDfr2oYycU+AK/W48IZFSYUvyEDyiMAjgkjHI0ajjD/Z6v7eCnvujmdgeGyAd3Tn17JDRT+8g1g6IO6BW2PHH2iInDJMJfiB99KrNDTLY1D1rhJGr7POc/LGxw6uq0JRwDyS46Z3k/OG18slKoBRv93S4MaXPUfh363m7WMQCdkh5D7AOv+GJxIhZqlSfq+LTGUvNygGHdahj1auIud/qsimKAwnGGnIICZpzUWZjrFqvtXTO42p85VvxlBCSJYPsCZrYraer989WnnCA0B3wq8zX4aWtaTM75+Wp2gR9ePzpHMR5pdOGGcRVv4aYA/VQ40nwG4M= X-MS-TrafficTypeDiagnostic: DB6PR01MB3895:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ia3TanEZag3BcwpbTVm0fL2YEFTRt2mOFzC9g80PGhgWpgF1hFhIs42qaEb4DE5Jyv4NGeSD3IUYQbqWDqVylJ9jhFA7UUq5p9WBkjYUofaLMI2MOM3MRdbnVA2DEeSLoryNwdb8ymFTNSsOI6lQv+/jstI9bqaSPpGEJFSubfaq1RJ+NF6dCCkR61W5QGSe+YVmO8atXiH5b5JHPA+LO+HyZT7gr00oxP7OGN/BYn7s/rmNJ7V9g3niefNBHXwtm3ny2jN934C9vSSVeom7EIGNI4MuRvDCD6aM/n5Ju2KLAGkJ2Ji/QgT1uhaTRccTy9yCqpV6DzMMJXvWsJmQIBZY7iV/VDyNx/mHLvRtDQ1IIPODITleSJztvgng6aauhcjkMK1ZuXI5pN3Q+S3OSlTB64i1sxU3NLNOZU09aQocwxSUrb6673siOJ960NAmfGm8i/NrPdx4I0SI1/0FRersXX/XGr4DrGGDZV9J7t2buk8+HIA9Ps5FFm2hxVEjDJW3XAGRP9rwMMk3+9QK0hdJQ2f40jm185rqqNfYJBq3KsQ7cgrsp5jVv8XO+ozQFYdX9NHoGeUTPHo485eWfA6sKTA2miU6ohnHHn/ZMdg8V5ZCYOByOEEy7G3oVKgv X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?m6hmvtuGoU/akCM6QyG+Orxl/fcTznsbrYaasvfKQwr2N4V/LCqcZ/mAh2KT?= =?us-ascii?Q?O4g+tCc3ilfQCwl/ERgMTtKTckD44/YZ8mZ27Vkdp8XguNzREP+YZgFKHpJn?= =?us-ascii?Q?ot3wTIAwMzTja99ZaypjuOwZm/MakSNN0DqrHspwGkekluuYGeadWlLMT8cc?= =?us-ascii?Q?Qi9wvazjLsBgMSTzB5dYxfDsgprr6nQa8QXDYyUblHsvEVRLuzxx8zXs0AJk?= =?us-ascii?Q?ww4mz38BH7MLSKKWlwJ4YseCrcNt1lMLu9r/8uIU4vWJkxt7FW7OmCGZxaDw?= =?us-ascii?Q?i725In2tGGDInW3Xn9qusvhMrwmLbkAQ7CisHb45eF7Huz6VEE+6tfjlmc9F?= =?us-ascii?Q?bMefJ+e1PsP1NFj1FJFHy//8qMWcyWE65jVWovvThYfKNKTZHFQmhx5lU9Aq?= =?us-ascii?Q?m4XcHuhZrbE3/LiNIgRSdDl+qj7r2cJ+7GypREFPPx1WGRLzT3KEW7LiilJ7?= =?us-ascii?Q?DNRuEarFvwAlxtlsQQI0e+FTivCdmDex/TUlldKi/ZBuFpVJpwU4Ul8m3h19?= =?us-ascii?Q?kwSDniM+nXKExoI0Z8LekDiV/zn8NTgNojfkdGNET/mS6jVXuoLWx1jvWoDr?= =?us-ascii?Q?EFTil2WBjImkglXWaQwNobJjhzsib8GcMfKkl3gUiBWElEsIwxv1iaqmTU5V?= =?us-ascii?Q?431sf3jAWvBPSmu4DyIHwaz3BkOL3SMC0LfTG5XLi9Hf6AJxhtB4u5pjxqdq?= =?us-ascii?Q?OHKnv1HOw5hejt/lxrxYzDNABg95XILZUSZj53sVSJzJclmcAuXgfsk97nJn?= =?us-ascii?Q?2uV9+WA3mty8fwBvtqAqchwbbhFacs0RUAHWNo7FvIfCSUZ2DtEouh5Xsk3/?= =?us-ascii?Q?Pyg9EGX0Z/xjx+L7AQ0gcUSVKP6cblvngCEGRkB9wtCmDPAm3C7BxHh56p2s?= =?us-ascii?Q?OTdzrIqa32kT3gwmHFT4kFhpMN7hM6MQ0DUlD0KefsvnqW+ZEJ7d5EWyD1FB?= =?us-ascii?Q?A89IwiCMMG7ae0v63TeWW2rFL7n/qTdG3j4fy2AbuyH/EVSwI0/DPOYfJjRZ?= =?us-ascii?Q?cFo08PiKVjp+7lMaVmIVpjWz/oUHq9hLRD/qIaRhEYtPiMjNC4/IPcTKhlHm?= =?us-ascii?Q?+Su/uTURc76iiWwpO3/89LnUVwDJJP8lAEjQveBVST7URjuCUIfz5G18NWl/?= =?us-ascii?Q?dXGo3oby2ZGAEcTJ3o+cLCZatpNivQi7Z/kMW+0WtBNDe5ENc5WTjRiJ21sZ?= =?us-ascii?Q?f3Q1JYn2VHdbnKLAuzMYfz2n2y7lN4E8WT839eHC7hNUEW3cIHxv7g0E51FY?= =?us-ascii?Q?XTAAerMEJcagkSjwPZ1xT8Svvd3d3NVOIGETIPGENFpjAtx7GNrUmfWq7W+P?= =?us-ascii?Q?uwRmGrjSPu65exqHiPKBN9h0NH2Dv8Tkn4RVd6meKTK+ZhuFV/Y2+EiuSfJt?= =?us-ascii?Q?SrOGuo4G7y/bqy8k+TriECSA328yClShApJChhlbPT1hILOupq6r5H4GRYXe?= =?us-ascii?Q?ZC78IuorYctg5+fIV3SUSIZkGIKhCTf2?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5d6a825-0abd-4942-a74b-08da301cf858 X-MS-Exchange-CrossTenant-AuthSource: AS8PR01MB7944.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2022 11:30:21.2310 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR01MB3895 Subject: [FFmpeg-devel] [PATCH 27/44] avformat/utils: Move ff_get_extradata to demux_utils.c X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Cc: Andreas Rheinhardt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: It is only used by demuxers (although it is hypothetically possible that some day e.g. a protocol might need it, but that is unlikely given that they don't deal with AVCodecParameters). Signed-off-by: Andreas Rheinhardt --- libavformat/aaxdec.c | 1 + libavformat/acm.c | 1 + libavformat/adxdec.c | 1 + libavformat/aiffdec.c | 1 + libavformat/aixdec.c | 1 + libavformat/anm.c | 1 + libavformat/apc.c | 2 +- libavformat/bfi.c | 1 + libavformat/bink.c | 1 + libavformat/cafdec.c | 1 + libavformat/demux.h | 9 +++++++++ libavformat/demux_utils.c | 17 +++++++++++++++++ libavformat/internal.h | 9 --------- libavformat/isom.c | 1 + libavformat/mpc.c | 1 + libavformat/nuv.c | 1 + libavformat/riffdec.c | 1 + libavformat/rl2.c | 1 + libavformat/rsd.c | 1 + libavformat/utils.c | 16 ---------------- libavformat/vc1test.c | 1 + libavformat/westwood_vqa.c | 1 + libavformat/yop.c | 1 + 23 files changed, 45 insertions(+), 26 deletions(-) diff --git a/libavformat/aaxdec.c b/libavformat/aaxdec.c index 0ae4057a53..e47ab3ad73 100644 --- a/libavformat/aaxdec.c +++ b/libavformat/aaxdec.c @@ -22,6 +22,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" #include "avio_internal.h" +#include "demux.h" #include "internal.h" typedef struct AAXColumn { diff --git a/libavformat/acm.c b/libavformat/acm.c index c88152d525..28a040330f 100644 --- a/libavformat/acm.c +++ b/libavformat/acm.c @@ -21,6 +21,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "demux.h" #include "rawdec.h" #include "internal.h" diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c index 31eda4e8b8..982e825426 100644 --- a/libavformat/adxdec.c +++ b/libavformat/adxdec.c @@ -25,6 +25,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "demux.h" #include "internal.h" #define BLOCK_SIZE 18 diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 3634bb4960..a70899d765 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -22,6 +22,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/dict.h" #include "avformat.h" +#include "demux.h" #include "internal.h" #include "pcm.h" #include "aiff.h" diff --git a/libavformat/aixdec.c b/libavformat/aixdec.c index 7cee80eb33..f7d8e17acd 100644 --- a/libavformat/aixdec.c +++ b/libavformat/aixdec.c @@ -21,6 +21,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "demux.h" #include "internal.h" static int aix_probe(const AVProbeData *p) diff --git a/libavformat/anm.c b/libavformat/anm.c index 1c29bbca29..7feba4ed1e 100644 --- a/libavformat/anm.c +++ b/libavformat/anm.c @@ -26,6 +26,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "demux.h" #include "internal.h" typedef struct Page { diff --git a/libavformat/apc.c b/libavformat/apc.c index 1bd5ccf710..b8b18c966c 100644 --- a/libavformat/apc.c +++ b/libavformat/apc.c @@ -23,7 +23,7 @@ #include "libavutil/channel_layout.h" #include "avformat.h" -#include "internal.h" +#include "demux.h" static int apc_probe(const AVProbeData *p) { diff --git a/libavformat/bfi.c b/libavformat/bfi.c index a42b78b8c0..6c449a80eb 100644 --- a/libavformat/bfi.c +++ b/libavformat/bfi.c @@ -29,6 +29,7 @@ #include "libavutil/channel_layout.h" #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "demux.h" #include "internal.h" typedef struct BFIContext { diff --git a/libavformat/bink.c b/libavformat/bink.c index 4f413bd986..f4079dfb1d 100644 --- a/libavformat/bink.c +++ b/libavformat/bink.c @@ -33,6 +33,7 @@ #include "libavutil/channel_layout.h" #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "demux.h" #include "internal.h" enum BinkAudFlags { diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c index f6c84e0dae..168f69f20b 100644 --- a/libavformat/cafdec.c +++ b/libavformat/cafdec.c @@ -28,6 +28,7 @@ #include #include "avformat.h" +#include "demux.h" #include "internal.h" #include "isom.h" #include "mov_chan.h" diff --git a/libavformat/demux.h b/libavformat/demux.h index 64adaff07d..209cd813ab 100644 --- a/libavformat/demux.h +++ b/libavformat/demux.h @@ -217,4 +217,13 @@ int ff_add_param_change(AVPacket *pkt, int32_t channels, */ int ff_generate_avci_extradata(AVStream *st); +/** + * Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end + * which is always set to 0 and fill it from pb. + * + * @param size size of extradata + * @return >= 0 if OK, AVERROR_xxx on error + */ +int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size); + #endif /* AVFORMAT_DEMUX_H */ diff --git a/libavformat/demux_utils.c b/libavformat/demux_utils.c index e42d2f3525..6e894ae28a 100644 --- a/libavformat/demux_utils.c +++ b/libavformat/demux_utils.c @@ -25,6 +25,7 @@ #include "libavcodec/bytestream.h" #include "libavcodec/packet_internal.h" #include "avformat.h" +#include "avio_internal.h" #include "demux.h" #include "internal.h" @@ -350,3 +351,19 @@ int ff_generate_avci_extradata(AVStream *st) return 0; } + +int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size) +{ + int ret = ff_alloc_extradata(par, size); + if (ret < 0) + return ret; + ret = ffio_read_size(pb, par->extradata, size); + if (ret < 0) { + av_freep(&par->extradata); + par->extradata_size = 0; + av_log(logctx, AV_LOG_ERROR, "Failed to read extradata of size %d\n", size); + return ret; + } + + return ret; +} diff --git a/libavformat/internal.h b/libavformat/internal.h index d46368228c..acda79821a 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -652,15 +652,6 @@ int ff_rename(const char *url_src, const char *url_dst, void *logctx); */ int ff_alloc_extradata(AVCodecParameters *par, int size); -/** - * Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end - * which is always set to 0 and fill it from pb. - * - * @param size size of extradata - * @return >= 0 if OK, AVERROR_xxx on error - */ -int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size); - /** * Copies the whilelists from one context to the other */ diff --git a/libavformat/isom.c b/libavformat/isom.c index e6569dfb68..38f2f4f2b1 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -22,6 +22,7 @@ */ #include "avformat.h" +#include "demux.h" #include "internal.h" #include "isom.h" #include "libavcodec/mpeg4audio.h" diff --git a/libavformat/mpc.c b/libavformat/mpc.c index f36768b5ff..ef16237ab6 100644 --- a/libavformat/mpc.c +++ b/libavformat/mpc.c @@ -22,6 +22,7 @@ #include "libavutil/channel_layout.h" #include "avformat.h" +#include "demux.h" #include "internal.h" #include "apetag.h" #include "id3v1.h" diff --git a/libavformat/nuv.c b/libavformat/nuv.c index 942ad525d5..12c6c691ee 100644 --- a/libavformat/nuv.c +++ b/libavformat/nuv.c @@ -25,6 +25,7 @@ #include "libavutil/intfloat.h" #include "avformat.h" #include "avio_internal.h" +#include "demux.h" #include "internal.h" #include "riff.h" diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c index 8cff699a8c..3946ecb72f 100644 --- a/libavformat/riffdec.c +++ b/libavformat/riffdec.c @@ -26,6 +26,7 @@ #include "libavutil/log.h" #include "avformat.h" #include "avio_internal.h" +#include "demux.h" #include "riff.h" int ff_get_guid(AVIOContext *s, ff_asf_guid *g) diff --git a/libavformat/rl2.c b/libavformat/rl2.c index b8f0523325..669cb0400b 100644 --- a/libavformat/rl2.c +++ b/libavformat/rl2.c @@ -37,6 +37,7 @@ #include "libavutil/intreadwrite.h" #include "libavutil/mathematics.h" #include "avformat.h" +#include "demux.h" #include "internal.h" #define EXTRADATA1_SIZE (6 + 256 * 3) ///< video base, clr, palette diff --git a/libavformat/rsd.c b/libavformat/rsd.c index c3b570da22..33aa0e2c0d 100644 --- a/libavformat/rsd.c +++ b/libavformat/rsd.c @@ -22,6 +22,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" #include "avio.h" +#include "demux.h" #include "internal.h" static const AVCodecTag rsd_tags[] = { diff --git a/libavformat/utils.c b/libavformat/utils.c index 00c0751195..06401b767c 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -359,22 +359,6 @@ int ff_alloc_extradata(AVCodecParameters *par, int size) return 0; } -int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size) -{ - int ret = ff_alloc_extradata(par, size); - if (ret < 0) - return ret; - ret = ffio_read_size(pb, par->extradata, size); - if (ret < 0) { - av_freep(&par->extradata); - par->extradata_size = 0; - av_log(logctx, AV_LOG_ERROR, "Failed to read extradata of size %d\n", size); - return ret; - } - - return ret; -} - AVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s) { for (unsigned i = 0; i < ic->nb_programs; i++) { diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c index 90ea729e0b..67edc699c5 100644 --- a/libavformat/vc1test.c +++ b/libavformat/vc1test.c @@ -28,6 +28,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "demux.h" #include "internal.h" #define VC1_EXTRADATA_SIZE 4 diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c index ed5c1a3416..e3d2e2668c 100644 --- a/libavformat/westwood_vqa.c +++ b/libavformat/westwood_vqa.c @@ -32,6 +32,7 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" #include "avio_internal.h" +#include "demux.h" #include "internal.h" #define FORM_TAG MKBETAG('F', 'O', 'R', 'M') diff --git a/libavformat/yop.c b/libavformat/yop.c index b0aa0bb64b..8fdad6899b 100644 --- a/libavformat/yop.c +++ b/libavformat/yop.c @@ -25,6 +25,7 @@ #include "libavutil/channel_layout.h" #include "libavutil/intreadwrite.h" #include "avformat.h" +#include "demux.h" #include "internal.h" typedef struct yop_dec_context { -- 2.32.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".