From patchwork Sun Apr 7 21:09:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47908 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:24a8:b0:1a3:b6bb:3029 with SMTP id m40csp2147418pzd; Sun, 7 Apr 2024 14:11:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXKGuvocb+vq6jjrNgzupLmOdHwgoi92ogTJmSZGiRLM3/SsSpeueRVAcyYsps9ZSRNdzHNEU33imF50Yu7gf04UcDLjlCYnKWbqA== X-Google-Smtp-Source: AGHT+IFhzC1o91IVKMBlhusVpFe3tA6DZxtkyGcQvDhomtT/NaN6lRrIGOtoLBCkp4N4IiehM5Al X-Received: by 2002:ac2:592c:0:b0:515:c8da:c96d with SMTP id v12-20020ac2592c000000b00515c8dac96dmr4898877lfi.19.1712524295008; Sun, 07 Apr 2024 14:11:35 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dz17-20020a0564021d5100b0056e214c14ddsi3165781edb.350.2024.04.07.14.11.34; Sun, 07 Apr 2024 14:11:34 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=FC1DRrjU; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0E35168D2A1; Mon, 8 Apr 2024 00:10:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01olkn2083.outbound.protection.outlook.com [40.92.64.83]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D391468D20F for ; Mon, 8 Apr 2024 00:09:50 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LvvyRFWJowQ9O7W6h/YEf8X2pII/DvouHJhdEzDEVWbTCdV0JjAtb8iQehf5kzQ9URYtWHVGzEtl1uyYrCNhFXYvbOWG3DYPi5clW6dQ6xQPlF0UYNsTJV0XkCUHYpG/92He7AhWkwZ6nNHPPCu8CcqX/8M/CHVg8BedDU3KQKs4MGo4Kwdm5Vrvt9XF2bS3d1+Vg8gw1Ln5zoUucxUrONU3dABMCy6AfsZFcpsvzQUruPSGn0fRFcprAS/qar33fuGH5Wq8TzNWNrJXDaR0sdJOwQEBRRp7fkbCrIkl4NGnlRxBmW7csdJaIOGwHV8xTzCHrlEQ29u+9BYG3teMqg== 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=Yi+oxSb1B1LL0I052SlUedzIAq9fOtHxwLzJ4Zos05c=; b=lmEO3ds7CuwDRKmYEPMcpQwVzHkzpxrGsFzErgVqBlgIdFQLhHXKJI07Cdsd1PUXdEqA4+xHNlObQPK0XfKGWvLZhT0pDi9bV4NID6MXh9ScavNvrIFYPce/Z35lRFwKODQqny2EEG+5rLAjRdEfMsJxmDnUHPvcor44SioFH7SBD09bywKuAgpzdyT8tqs8YQe3geQIieVmFu0khVcSumHBZO4KdZINDcCLYE1MBl/xlJ0vUC1tOtKZ6fhRE5FQsSt/Y8cKxBQzFsOCXglRNuAfhbdueazb22ZCsua/iB2lLFIR00Vj9FOJrsQoBF3W6qh1m2dWmVJJMtaU3vJ6fA== 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=Yi+oxSb1B1LL0I052SlUedzIAq9fOtHxwLzJ4Zos05c=; b=FC1DRrjUpVCKQQoTnN+1SkLJRB12GqUDUKYWKrqZDize8QBZIUvNXpbKXyb5vhPcCx33er7CzFdKep5EaeJ63b6Y+d88pri8ZPI0vY3wMFF7X94QPFxLNXeoaSklZYIl6dhlbr8+t1WqnDbvkJ44NwDHLTE/Ou7L09S+6cdEmx+wRF4PB5AC03tff0TqLHop4T2k77xNv2mLm2vNue/vavJjyyPZEdFeyzoElpFxepurIrzhpVexQF1+6QOVDlL+URMCU5EO3mzOvAeAT8Rlgb9yNKpvly58JqJ02VqTV+T4P80BgLdmlAsiXNwGbG0GhJ0Asy3qwJMjNqsb2YtYDw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS8P250MB0234.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:379::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Sun, 7 Apr 2024 21:09:46 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.042; Sun, 7 Apr 2024 21:09:46 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 7 Apr 2024 23:09:15 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [e2myuZ962xGpRS+lEJPtbhIp4MJTb07HxXbdq6ITBZg=] X-ClientProxiedBy: ZR0P278CA0038.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1d::7) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240407210915.895619-16-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS8P250MB0234:EE_ X-MS-Office365-Filtering-Correlation-Id: 6eb21c6d-f16c-4410-d5d3-08dc57470db7 X-MS-Exchange-SLBlob-MailProps: Cq7lScuPrnpOxDCcKCE3ew6GouC7ydNh7MVdu5BJ6iCaQHmMtTkGSXy+1jVBHyvvo9lKIiGBdb3YIR05pFXp/tbIuxfnR5cbgozOKmyyf9Wf6oxB+MypJgvTKp1D/AfcFjmbp2JoRPZpWkUGi9ZC2rX2CAwsyjak58+nZxvjez9QEBtmGh/L7hY3k+D5TTFQKTgddy3V8Xn8z+STwm/rWpsPBWdrh3Swsf7om6jEcfi/ImD04TwFOKBUCrLXlP4fwl3xzfEHPIA81OiC59XMrCl6fsYUcVJdG3iuBlvt+4PwPZ1YHUSNHmcQYSJIQZp6VepH5vjIJRJLtomhZqZ99NWyR3LQhlSKBK5YsByGkfoD6i+0JGi4SCoeTRyn0JgctiV7YjtfsymuMPZ5dCGgF0RZaxrJ6l3Il6bQkB4lLtY7jT75+XApktpmJl/joBK1RXOoswSkhq1nLN8IgDRaV15bN8hUaWt6yPblQP9supJ6dP9g3NBBhBeQsrNEUfbTlOhVxdzyTdhd2+Z/ovUeVPcJwffI3AqUO826FvZvARsUCBha2i1XBAxkQlMC+U86h2hmSokA/how1AnbRgXfEHWs19hD7qD3knPBBbq1/UylVIehLwj3gv88erOrZzukJbMC4nZRsnTkfwc3pxVHR1dnCXqUm1x6ulSnh1dL4QhgVz7w+5YUNVNo8UTFt86tWy/wjM+2Br3Gzq+LGbg9BUX5wvpcmCsVCJIAxLSqzj2Ut4xNt47amM5b46lY8uZLNhCCnltvLeI= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HrJhuipNK7o6wIxVld7gqzdcoUw1diVxDmkjuBBMe23D7bxPFSYKNanpEx1jplDf2visuWqTWOImgURmP4FSEz8n1yGhZn6cKurx3JlaehSUvMOezEQOeYnoPb2n2K81JZRVGSHT76UR7D0bpH6uEMVG6X2aeHUufAmdZLdwPyt4UL8PXrQy7pNBIJKzC1vpZUN5mSffDYxz7Q2I35EDNZ7lTxlo2X7KS30SWcA+dTWiVEmM1oFXEQjFX1VHWdEzbVqSZMaTUB5dmROmclsya3oJarvomv+y5StWcpZoEXIY33IM+K1qWjtiFd4dBZ4Rw65y74s5cMR96oVgz6aihz8N734b0yb8W74B57PEAnojt/JrubEfxuKJAqPByp7moK88kFTs6KKC6k79R+Ndox2i6N1I29lft2cmk83YjQ/ItMtVKSrxOF+zsui/MaADvxgr9X2N/0SH/n9Ns0sbsM4ujFassiaF7kegrjLVhx62OEnabJ6T3SxBe8E/pZE4V2QkAyYQ0uh13k2NHJA02hpCZAqy9V3K+bKmh1JfUmvirJr+Aq9ViK29SYWXRCc1+R/FpMiw9H7aSQIKe9A1vNqz32xYUwfRfO7Qxcuss9g= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qiu4RhI7ZFkQkGN0vtGZwjPIVjva+KyxI9oAOoyQ7u1VgafrMS6tPC8m11vbodHX93mQRGktIUuE4SPDdlt96/DKLC/V7tBSNQ+lxdXxjKKnbR+yeTHNRGaM+6FcbK1dRFz9+xjlpZhxvVRsQFuEhvFlZSDWyDVW2rG4uYJRmjkOsh+y6dTHROBpN5cQh/EWDch4YTvEe2pG4jcWgB48U42EP2AS5kFJHSjyAJDZW9CLs+5CbKdHhMlgZKhaj3EDAa0c554kgrP4fUxvXFUrhToYudErlE/rySASNsjbeWYPWNqfUuiHcmzJDcLzJPMuAsFLpKxmZ5clGrwvsQmFw/oXfBN0GJNIP3570BvKAvLADTl9v/kFQx5J8b2YMUETl8PVFW3JO2C5xQUdEqyeewjgFOQitMcea+jiqTnZ5/N7pyp1m7lph8ie/SC5yVepgqy9lP8SuACWMEdpPCTJdeFa+nfSqIDWD/cL6Fozycn1mrihpl5mTUr/SRZ/hOErDW2C7w9frdIpNtsw9o1WKgVMRocD3BpyDwIktluEZpv6h/zy12LUn1TzmIPZKCRH0H1hXgC4ovEf2vMOmlWH9TyZujY5DyVCFGzOkcVuXbWQSJxtP3NH12O/+Rg6SqwPxmYmgMAJZ97QrXzXIggCnnK1sXUMaJ6AiFt/RZazoaJF/3dSWZ7MuLvpt1BADrvGV5GGHiva2Tt+g/9bwbmRHebvzhaMO97FZiNYyu1sIQuuyGwKriS6wlO6pKgIVsdvfaVkVSjqeOGh1uZaTHl+UCNd0vEyphSIMUHcHEUfPggMM198b/m1neBNdqyTcVLBKa4UVcx4gtIKpSFk9+vZCTQUq8bOcBrbheyZ48aSFyUpt0PIKnqRrEfMILBJex0fO7po1Tj9soaE+43ooTw3HWCZsj+9igoosNp+UwjWeZdTzrHJ6w+8pv+6V+nKuuMZFmo0ZGoIDOkThl7Ja46f2YmrtGoVChWW8e8FVAHCXOPaQhqybZZTHFfI5HvqCkrRcM82anK2q6FlHANkADBtDoWkQxNgs2p4b86qWhesHhaJq8rFIwLIDNieKIAxFsw+YQNnCnJ5JsB+EbfuxUNn3dd6JXGeMuU9kChvzHhpPa9MIuebDgWLgayKbDUTdqXbajA3Eja84+qtUAdfsD+b+miPvRsiYoOP0wlQU3wdwb4FaNbwlhcbEZtFtMZHmLDkgiJBalbu4dshpJpjEv8aiTWpVLad0Vm19/LIAVHtg7Tfcissj2I1UjGJ5rllw+QhZVe4XQMWjSww+e90GfZc+A== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6eb21c6d-f16c-4410-d5d3-08dc57470db7 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2024 21:09:46.5827 (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: AS8P250MB0234 Subject: [FFmpeg-devel] [PATCH 17/17] avformat/img2: Avoid relocations for ff_img_tags 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: d9WXJGQD9AoP The strings here are so short that using a pointer is wasteful (the longest string takes nine bytes; on 64 bit systems, the pointer+padding already take 12 bytes). So avoid them and add asserts to ensure that no one ever tries to use a too long tag. Signed-off-by: Andreas Rheinhardt --- libavformat/img2.c | 148 ++++++++++++++++++++++++--------------------- libavformat/img2.h | 2 +- 2 files changed, 80 insertions(+), 70 deletions(-) diff --git a/libavformat/img2.c b/libavformat/img2.c index 06e48549ac..9981867f82 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -20,80 +20,90 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include "libavutil/avstring.h" #include "internal.h" #include "img2.h" +#define IMG_TAGS(TAG) \ + TAG(MJPEG, jpeg ) \ + TAG(MJPEG, jpg ) \ + TAG(MJPEG, jps ) \ + TAG(MJPEG, mpo ) \ + TAG(LJPEG, ljpg ) \ + TAG(JPEGLS, jls ) \ + TAG(PNG, png ) \ + TAG(PNG, pns ) \ + TAG(PNG, mng ) \ + TAG(PPM, ppm ) \ + TAG(PPM, pnm ) \ + TAG(PGM, pgm ) \ + TAG(PGMYUV, pgmyuv ) \ + TAG(PBM, pbm ) \ + TAG(PAM, pam ) \ + TAG(PFM, pfm ) \ + TAG(PHM, phm ) \ + TAG(CRI, cri ) \ + TAG(ALIAS_PIX, pix ) \ + TAG(DDS, dds ) \ + TAG(MPEG1VIDEO, mpg1-img ) \ + TAG(MPEG2VIDEO, mpg2-img ) \ + TAG(MPEG4, mpg4-img ) \ + TAG(RAWVIDEO, y ) \ + TAG(RAWVIDEO, raw ) \ + TAG(BMP, bmp ) \ + TAG(TARGA, tga ) \ + TAG(TIFF, tiff ) \ + TAG(TIFF, tif ) \ + TAG(TIFF, dng ) \ + TAG(SGI, sgi ) \ + TAG(PTX, ptx ) \ + TAG(PHOTOCD, pcd ) \ + TAG(PCX, pcx ) \ + TAG(QDRAW, pic ) \ + TAG(QDRAW, pct ) \ + TAG(QDRAW, pict ) \ + TAG(SUNRAST, sun ) \ + TAG(SUNRAST, ras ) \ + TAG(SUNRAST, rs ) \ + TAG(SUNRAST, im1 ) \ + TAG(SUNRAST, im8 ) \ + TAG(SUNRAST, im24 ) \ + TAG(SUNRAST, im32 ) \ + TAG(SUNRAST, sunras ) \ + TAG(SVG, svg ) \ + TAG(SVG, svgz ) \ + TAG(JPEG2000, j2c ) \ + TAG(JPEG2000, jp2 ) \ + TAG(JPEG2000, jpc ) \ + TAG(JPEG2000, j2k ) \ + TAG(DPX, dpx ) \ + TAG(EXR, exr ) \ + TAG(PICTOR, pic ) \ + TAG(V210X, yuv10 ) \ + TAG(WEBP, webp ) \ + TAG(XBM, xbm ) \ + TAG(XPM, xpm ) \ + TAG(XFACE, xface ) \ + TAG(XWD, xwd ) \ + TAG(GEM, img ) \ + TAG(GEM, ximg ) \ + TAG(GEM, timg ) \ + TAG(VBN, vbn ) \ + TAG(JPEGXL, jxl ) \ + TAG(QOI, qoi ) \ + TAG(RADIANCE_HDR, hdr ) \ + TAG(WBMP, wbmp ) \ + TAG(NONE, ) + +#define LENGTH_CHECK(CODECID, STR) \ + static_assert(sizeof(#STR) <= sizeof(ff_img_tags->str), #STR " does not fit into IdStrMap.str\n"); +IMG_TAGS(LENGTH_CHECK) + const IdStrMap ff_img_tags[] = { - { AV_CODEC_ID_MJPEG, "jpeg" }, - { AV_CODEC_ID_MJPEG, "jpg" }, - { AV_CODEC_ID_MJPEG, "jps" }, - { AV_CODEC_ID_MJPEG, "mpo" }, - { AV_CODEC_ID_LJPEG, "ljpg" }, - { AV_CODEC_ID_JPEGLS, "jls" }, - { AV_CODEC_ID_PNG, "png" }, - { AV_CODEC_ID_PNG, "pns" }, - { AV_CODEC_ID_PNG, "mng" }, - { AV_CODEC_ID_PPM, "ppm" }, - { AV_CODEC_ID_PPM, "pnm" }, - { AV_CODEC_ID_PGM, "pgm" }, - { AV_CODEC_ID_PGMYUV, "pgmyuv" }, - { AV_CODEC_ID_PBM, "pbm" }, - { AV_CODEC_ID_PAM, "pam" }, - { AV_CODEC_ID_PFM, "pfm" }, - { AV_CODEC_ID_PHM, "phm" }, - { AV_CODEC_ID_CRI, "cri" }, - { AV_CODEC_ID_ALIAS_PIX, "pix" }, - { AV_CODEC_ID_DDS, "dds" }, - { AV_CODEC_ID_MPEG1VIDEO, "mpg1-img" }, - { AV_CODEC_ID_MPEG2VIDEO, "mpg2-img" }, - { AV_CODEC_ID_MPEG4, "mpg4-img" }, - { AV_CODEC_ID_RAWVIDEO, "y" }, - { AV_CODEC_ID_RAWVIDEO, "raw" }, - { AV_CODEC_ID_BMP, "bmp" }, - { AV_CODEC_ID_TARGA, "tga" }, - { AV_CODEC_ID_TIFF, "tiff" }, - { AV_CODEC_ID_TIFF, "tif" }, - { AV_CODEC_ID_TIFF, "dng" }, - { AV_CODEC_ID_SGI, "sgi" }, - { AV_CODEC_ID_PTX, "ptx" }, - { AV_CODEC_ID_PHOTOCD, "pcd" }, - { AV_CODEC_ID_PCX, "pcx" }, - { AV_CODEC_ID_QDRAW, "pic" }, - { AV_CODEC_ID_QDRAW, "pct" }, - { AV_CODEC_ID_QDRAW, "pict" }, - { AV_CODEC_ID_SUNRAST, "sun" }, - { AV_CODEC_ID_SUNRAST, "ras" }, - { AV_CODEC_ID_SUNRAST, "rs" }, - { AV_CODEC_ID_SUNRAST, "im1" }, - { AV_CODEC_ID_SUNRAST, "im8" }, - { AV_CODEC_ID_SUNRAST, "im24" }, - { AV_CODEC_ID_SUNRAST, "im32" }, - { AV_CODEC_ID_SUNRAST, "sunras" }, - { AV_CODEC_ID_SVG, "svg" }, - { AV_CODEC_ID_SVG, "svgz" }, - { AV_CODEC_ID_JPEG2000, "j2c" }, - { AV_CODEC_ID_JPEG2000, "jp2" }, - { AV_CODEC_ID_JPEG2000, "jpc" }, - { AV_CODEC_ID_JPEG2000, "j2k" }, - { AV_CODEC_ID_DPX, "dpx" }, - { AV_CODEC_ID_EXR, "exr" }, - { AV_CODEC_ID_PICTOR, "pic" }, - { AV_CODEC_ID_V210X, "yuv10" }, - { AV_CODEC_ID_WEBP, "webp" }, - { AV_CODEC_ID_XBM, "xbm" }, - { AV_CODEC_ID_XPM, "xpm" }, - { AV_CODEC_ID_XFACE, "xface" }, - { AV_CODEC_ID_XWD, "xwd" }, - { AV_CODEC_ID_GEM, "img" }, - { AV_CODEC_ID_GEM, "ximg" }, - { AV_CODEC_ID_GEM, "timg" }, - { AV_CODEC_ID_VBN, "vbn" }, - { AV_CODEC_ID_JPEGXL, "jxl" }, - { AV_CODEC_ID_QOI, "qoi" }, - { AV_CODEC_ID_RADIANCE_HDR, "hdr" }, - { AV_CODEC_ID_WBMP, "wbmp" }, - { AV_CODEC_ID_NONE, NULL } +#define TAG(CODECID, STR) { AV_CODEC_ID_ ## CODECID, #STR }, +IMG_TAGS(TAG) }; static enum AVCodecID str2id(const IdStrMap *tags, const char *str) diff --git a/libavformat/img2.h b/libavformat/img2.h index 5fd8ff77fc..e98902c96f 100644 --- a/libavformat/img2.h +++ b/libavformat/img2.h @@ -66,7 +66,7 @@ typedef struct VideoDemuxData { typedef struct IdStrMap { enum AVCodecID id; - const char *str; + char str[12]; } IdStrMap; extern const IdStrMap ff_img_tags[];