From patchwork Fri Nov 19 19:15:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 31508 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2860359iob; Fri, 19 Nov 2021 11:15:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdO6lvYqdN+v9+Oag7GYNaFDvzgTbhLhDWhH6AwbWFpXEM5YxoZLXAaQyXAyYJOqJYowzu X-Received: by 2002:a17:906:7304:: with SMTP id di4mr10770721ejc.474.1637349347701; Fri, 19 Nov 2021 11:15:47 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4si1017148ejc.763.2021.11.19.11.15.46; Fri, 19 Nov 2021 11:15:47 -0800 (PST) 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="HFv6Bt/G"; 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 19DCB68A744; Fri, 19 Nov 2021 21:15:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-oln040092071055.outbound.protection.outlook.com [40.92.71.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CB04268A132 for ; Fri, 19 Nov 2021 21:15:34 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bS7mOeYF4WuE5x3XHHLEyLZepPSFPYS+KlAzkLJgzFCTkyvveHsAydpFXe2zMIJc785YWNDoL2wfcJ/vPPdVozT5IGRZKGqQ/7wBAJiXP4dl6qpXA+bLyhTDRvbS5Z86ohIwykG1G+9W25FASqag7katZfZSau0tMs/bAYxz8vcjkW8moZPdF3jN/hU93KDOMYUIN33Th8/DAKiMEmmr6wPRay5KzyyMPPxXynuzZuKFqUkfM4BuNQsXnBenRuU68H6zNiNKcfC/nGubCG+QkQby1sAXtlZnc3Js3tKwfSx4wkJqYUTh1wetFyQSn4tXr8EQcqEHwzZZHoYoIxXM6A== 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=bwyKiRBq0L2AStf7KfWlXV0K++jw6LdgisVYogs8FYw=; b=LDgEX6HYFYR37O9yE1kk83XOM+Sic24EYY19rO1rAvZsqzQ/aOi8K6+dwMelapgl8eqtbvujcXTl46tLt3VzDnNb53OpInxJJPDzDfx4lawyk8RRf5KBvqyTAM8XcSzA8eOkG2Y5xew5s+r0+Zk0ZeXdzcd8wlfQAGYMVquGSSI/0lgHW1KzFLzE4+hAslAyF2ClJzVsIYQZuCodYOfDVzib2NP2lmh2XLnT+ROzLozU1RK3i8zHAtI7khrfZEu3DiHtEaNMmqG+meKjh8LCoejQMKygJ4zc7uo6GhvyG00oRPaqvzQIIu7bPAYuuRpNGhRy2zgIoAbxf0TDeYLZ3Q== 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=bwyKiRBq0L2AStf7KfWlXV0K++jw6LdgisVYogs8FYw=; b=HFv6Bt/GnTk2pU/pEQgjecMEDkx8Zm6geAKEiBl0R+DH5LvWIUBwdtyyPDffUSgQES5gKssiaf4k0V8WmkzBfMkLu6vXGdJH9XKw6Rz/nHZQ0tuau+Q6emdSPgViFzRSL1U81WhtKGyC0M5WVj0OBwsfEsNWLOpaRHe6vN3YwlEbr8m1jtSZBIy0eKiTXN0+kdxwXoyAjcbtUZzLosiTYBHOsUUABF19brC7VkemErRV551C0NQrZtFOn/JUe6Y0VHCMVAQL0m/x7bEJUo/Y2Y2AbhOkt4zW5TtJubFNd0JLfGpbr3OEWjhYQIkS+BRPkCRhbg1FWh1huRSfBOsTdQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB4886.eurprd03.prod.outlook.com (2603:10a6:20b:85::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.22; Fri, 19 Nov 2021 19:15:32 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51%9]) with mapi id 15.20.4713.022; Fri, 19 Nov 2021 19:15:32 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 20:15:20 +0100 Message-ID: X-Mailer: git-send-email 2.30.2 X-TMN: [BBpOX+4rHgDhOhExnEY2FIMZBAPoVpND] X-ClientProxiedBy: AS8PR04CA0111.eurprd04.prod.outlook.com (2603:10a6:20b:31e::26) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211119191524.1025835-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.12) by AS8PR04CA0111.eurprd04.prod.outlook.com (2603:10a6:20b:31e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.22 via Frontend Transport; Fri, 19 Nov 2021 19:15:31 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3208d861-0316-42fe-bd46-08d9ab90f4da X-MS-Exchange-SLBlob-MailProps: EpEO96k6WolGhf8HUbp7Tbhr2SS12qUIprPxQJy4D0azqbbmRDofrG3PDYDiD01FTJ0/zP5arBu1AhoCam1gT7SYwLRBQ04vVjOF39u6I8vUHIjwtY61ISF4cTFv33VNO2wACbOsZsxmsvkm4i9kzpapxvCdorl/D+gUG/m6ZjG5NjtmlrE7KIrEY8ObE5uoSo/Qbq+g9LcnMvca1JY+xI0By+e/2htRZdx9h0Z6kK6vryXkzf283cqhUOlpgOaB3XuKnzeT9yRDRtm9PPo7rfm25ap8jiWAQwXH20wNZ/ytX+JPg5LFM1v8vAiLO0cPEORv3gAH24hqOIACJRKKFtRZ8+yt3OcDcf/Qxntb9u5/b3H49SuK+NN56uD3mQXeZoBrMYJkefRUVUH/3PDIL1PXZnpWjIlnPhjrtrEJAee45Ra+gFcH43SWY30WNixPs17z9n9lL3zQY7mhyzmmSQCp9EfgDsrzwfl1tYMQ3tzWJ9+DTeCcviF8psTv4okLe/6o6Z5eTySqh3PT/WY9scSEI6/CoenBTtitjcv7eULDBSBMynheeVw4DXo6iQDHVZl3R+HVCBjJvcsj3bAXGCyuoyhK66nxGM4bJ+az2LaPkCFCW914xNO4cdzxG188h6T4S/lWDDPTb27/AuxLFSE4BGW0AR65x6hzQfIS1EQ/DR52o74nvUCugKH05Li+wUeAuMG6+16YUh4PTVgAaNmXWgU0RHt4W2ju5Z2RWjmC7xGUV9wNBi6UEplDkaaKfc8ZslXzSAc= X-MS-TrafficTypeDiagnostic: AM6PR03MB4886: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eQAUbe0U3kt0saVXFacmrCUkEpmUiOatoJq7ePVkYdBIFGt5sPSwfZIyp6Ya3nc2suWm3eYBPZ87SEEb5ZgFBe6LVFf1yAaG7W3qXRn7LuqScUETrW2CEvo3aDnYknBWj9V9DtiyBsk6KVk8hltkjVdZbrWDtZn2qV7ew91sE+IEDwkTzCNYe4TNReaNYPgW1Et6EcQZNpSteKfCkLO7hFJDH+seU+0+ZSVIPNaGujX5S3+xQ6/ru83dqf0TAb9rjBtGh8zmG/w+vKPFFaxYRs2FgXQ6OJxAtlNu9mD6XFuEciwVvZHFASyOIU5hOKPdKeOzevYbWO3zsH6D0DcGo2YYxFDCEPYcEjkdf9klYSjzYz3Quy7p8+fKNMbR6N8eKEb2IwbdzdbZ7uMPqGQd64KfydxdLXEKUFV2yh/OdV+x/PH/2cFWyGVam/hQecxAE7OQBhTlXIZ4C4Q/UzeoWmK3eRUWnJA//BcQAP/saaGir6xOInkEGB0bvxHXkBQqPlznw44yuqBEDfMQe7smIupVwbkaBhghIDBpTYH5Rqv77RK70nsXM60mAvVkG1ZFWAmhtj9evX1mddZZzHNgWw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iVHcYKnPUU6gi7lk1mtP6R91FZZUFHToMlbjSkVvUpLhHQix0lDqkntknc9/M6gY9cbU7obUqNO3VWqh7Z+Z/4iCkpUyBiC6eI5iJK0YlrxXMhl9dJ1AQaM+KzVp/Rhbc+mDkmmfr77rca7P/qNuXdrlt8SDZx9z+SpHZm2iovIocYuTzcJU+Tizhw4VGfXM2oRr5plKzammzEsMccMqWRQxCF+c3ljo7RrvzlXus3TsIwIU7sEqMe+122O273AvnpmT8z25k7fY++qJ0ph5n0IDFZuux/SypVY8JO2Z5SZK9RHxja0OqZ8cRA8Sr5UtHoG40JcMrS25wYwESAidHbB6UjKTYe5MDUVHEX1ktn/HD+X/zREL1NlMbOkej9wxU69KeHV4xtAjzz5ZmQoIEajRlA7L/YknZhvIeiF0kbNC+XRbHJkco1RCbmQ7Y0bwO2JrJ5F4zZcjxyJsZEvwmeNXFRu6Vw0yqpPPlo72OrkPKON6Jw/1AEMMhZYjeXMpduo07vuAqq7IQeiCb3xOc61SgNcy3pcVuwbRGCJ9fPm/XJ9rqLJmUlNBxxL20D0L3wSkMzcJmnS6nBGv7yVlXNzO/oR/mthsZJDM/+pGleAwLMoj5fgZGcgm//m5kEh8YCygDJi75hu5ABslQLm5vOfVjqio0kG4ERsw25KXSGnh6DrzCIlkz1iIagKcghdMGsHJ+klNrk2Dgc10l18K/w== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3208d861-0316-42fe-bd46-08d9ab90f4da X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2021 19:15:32.4916 (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: AM6PR03MB4886 Subject: [FFmpeg-devel] [PATCH 1/5] avformat/avformat: Add AVStream parameter to check_bitstream() sig 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: 4vsvxwzAv4nm For most check_bitstream() functions this just avoids having to dereference s->streams[pkt->stream_index] themselves; but for meta-muxers it will allow to forward the packet to stream with a different stream_index (belonging to a different AVFormatContext) without using a spare packet. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 7 ++++++- libavformat/dashenc.c | 12 +++++++----- libavformat/flvenc.c | 4 ++-- libavformat/latmenc.c | 4 ++-- libavformat/matroskaenc.c | 4 ++-- libavformat/movenc.c | 4 ++-- libavformat/mpegtsenc.c | 4 ++-- libavformat/mux.c | 2 +- libavformat/rawenc.c | 12 ++++++------ libavformat/segment.c | 10 ++++++---- 10 files changed, 36 insertions(+), 27 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 0343825aa0..75699f3a32 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -322,6 +322,7 @@ #include "libavformat/version.h" struct AVFormatContext; +struct AVStream; struct AVDeviceInfoList; struct AVDeviceCapabilitiesQuery; @@ -623,9 +624,13 @@ typedef struct AVOutputFormat { /** * Set up any necessary bitstream filtering and extract any extra data needed * for the global header. + * + * @note pkt might have been directly forwarded by a meta-muxer; therefore + * pkt->stream_index as well as the pkt's timebase might be invalid. * Return 0 if more packets from this stream must be checked; 1 if not. */ - int (*check_bitstream)(struct AVFormatContext *, const AVPacket *pkt); + int (*check_bitstream)(struct AVFormatContext *s, struct AVStream *st, + const AVPacket *pkt); } AVOutputFormat; /** * @} diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 5faf06e11d..dd2b34afbb 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -2333,19 +2333,21 @@ static int dash_write_trailer(AVFormatContext *s) return 0; } -static int dash_check_bitstream(struct AVFormatContext *s, const AVPacket *avpkt) +static int dash_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *avpkt) { DASHContext *c = s->priv_data; - OutputStream *os = &c->streams[avpkt->stream_index]; + OutputStream *os = &c->streams[st->index]; AVFormatContext *oc = os->ctx; if (oc->oformat->check_bitstream) { + AVStream *const ost = oc->streams[0]; int ret; AVPacket pkt = *avpkt; pkt.stream_index = 0; - ret = oc->oformat->check_bitstream(oc, &pkt); + ret = oc->oformat->check_bitstream(oc, ost, &pkt); if (ret == 1) { - FFStream *const sti = ffstream(s->streams[avpkt->stream_index]); - FFStream *const osti = ffstream(oc->streams[0]); + FFStream *const sti = ffstream(st); + FFStream *const osti = ffstream(ost); sti->bsfc = osti->bsfc; osti->bsfc = NULL; } diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 3f24c7e192..c5926575a1 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -1083,10 +1083,10 @@ fail: return ret; } -static int flv_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int flv_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { int ret = 1; - AVStream *st = s->streams[pkt->stream_index]; if (st->codecpar->codec_id == AV_CODEC_ID_AAC) { if (pkt->size > 2 && (AV_RB16(pkt->data) & 0xfff0) == 0xfff0) diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c index 21bb614f67..72865c9565 100644 --- a/libavformat/latmenc.c +++ b/libavformat/latmenc.c @@ -245,10 +245,10 @@ too_large: return AVERROR_INVALIDDATA; } -static int latm_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int latm_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { int ret = 1; - AVStream *st = s->streams[pkt->stream_index]; if (st->codecpar->codec_id == AV_CODEC_ID_AAC) { if (pkt->size > 2 && (AV_RB16(pkt->data) & 0xfff0) == 0xfff0) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 6945c26f5a..f08ead0a96 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -2731,10 +2731,10 @@ static int mkv_init(struct AVFormatContext *s) return 0; } -static int mkv_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int mkv_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { int ret = 1; - AVStream *st = s->streams[pkt->stream_index]; if (st->codecpar->codec_id == AV_CODEC_ID_AAC) { if (pkt->size > 2 && (AV_RB16(pkt->data) & 0xfff0) == 0xfff0) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 37d4403f7a..fec467979a 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -7343,10 +7343,10 @@ static int mov_write_trailer(AVFormatContext *s) return res; } -static int mov_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int mov_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { int ret = 1; - AVStream *st = s->streams[pkt->stream_index]; if (st->codecpar->codec_id == AV_CODEC_ID_AAC) { if (pkt->size > 2 && (AV_RB16(pkt->data) & 0xfff0) == 0xfff0) diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index e3fba54939..79ec1a7e5f 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -2208,10 +2208,10 @@ static void mpegts_deinit(AVFormatContext *s) av_freep(&ts->services); } -static int mpegts_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int mpegts_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { int ret = 1; - AVStream *st = s->streams[pkt->stream_index]; if (st->codecpar->codec_id == AV_CODEC_ID_H264) { if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 && diff --git a/libavformat/mux.c b/libavformat/mux.c index 1389bcc003..d93dc73f8e 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -1074,7 +1074,7 @@ static int check_bitstream(AVFormatContext *s, FFStream *sti, AVPacket *pkt) if (s->oformat->check_bitstream) { if (!sti->bitstream_checked) { - if ((ret = s->oformat->check_bitstream(s, pkt)) < 0) + if ((ret = s->oformat->check_bitstream(s, &sti->pub, pkt)) < 0) return ret; else if (ret == 1) sti->bitstream_checked = 1; diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c index 15e7051873..4bbae7717b 100644 --- a/libavformat/rawenc.c +++ b/libavformat/rawenc.c @@ -341,9 +341,9 @@ const AVOutputFormat ff_h263_muxer = { #endif #if CONFIG_H264_MUXER -static int h264_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int h264_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { - AVStream *st = s->streams[0]; if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 && AV_RB24(pkt->data) != 0x000001) return ff_stream_add_bitstream_filter(st, "h264_mp4toannexb", NULL); @@ -364,9 +364,9 @@ const AVOutputFormat ff_h264_muxer = { #endif #if CONFIG_HEVC_MUXER -static int hevc_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int hevc_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { - AVStream *st = s->streams[0]; if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 && AV_RB24(pkt->data) != 0x000001) return ff_stream_add_bitstream_filter(st, "hevc_mp4toannexb", NULL); @@ -468,9 +468,9 @@ const AVOutputFormat ff_mpeg2video_muxer = { #endif #if CONFIG_OBU_MUXER -static int obu_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int obu_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { - AVStream *st = s->streams[0]; return ff_stream_add_bitstream_filter(st, "av1_metadata", "td=insert"); } diff --git a/libavformat/segment.c b/libavformat/segment.c index 2b024fd373..9861462405 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -984,15 +984,17 @@ static int seg_write_trailer(struct AVFormatContext *s) return ret; } -static int seg_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int seg_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { SegmentContext *seg = s->priv_data; AVFormatContext *oc = seg->avf; if (oc->oformat->check_bitstream) { - int ret = oc->oformat->check_bitstream(oc, pkt); + AVStream *const ost = oc->streams[st->index]; + int ret = oc->oformat->check_bitstream(oc, ost, pkt); if (ret == 1) { - FFStream *const sti = ffstream( s->streams[pkt->stream_index]); - FFStream *const osti = ffstream(oc->streams[pkt->stream_index]); + FFStream *const sti = ffstream(st); + FFStream *const osti = ffstream(ost); sti->bsfc = osti->bsfc; osti->bsfc = NULL; } From patchwork Fri Nov 19 19:16:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 31507 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2862256iob; Fri, 19 Nov 2021 11:17:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3NhPNGmpuTzqyEUBqNRqP/M8Mz33U1HqciafOQV9YntHvI0WoIsfyMDGIl7MiyA0pJcVt X-Received: by 2002:a17:906:5653:: with SMTP id v19mr10838100ejr.360.1637349430810; Fri, 19 Nov 2021 11:17:10 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u18si1278306eda.491.2021.11.19.11.17.10; Fri, 19 Nov 2021 11:17:10 -0800 (PST) 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=XWfO4XxT; 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 5955C68A785; Fri, 19 Nov 2021 21:17:08 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-oln040092070048.outbound.protection.outlook.com [40.92.70.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 151FB68A6E7 for ; Fri, 19 Nov 2021 21:17:01 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lw8DmdrC181fsKWNfAat1Pa6BUxgHjx5r1+pMkJi3PPUaB7zpxfXf/1dRHWwJDLbmqmIxEcbYM7s3LkC/ZGKB7SZaWuk+qdyyjreS0xN/wCRLNZwWtPPGqh0JMTEQrIMVUqTBAlICASigu2KNfSTXvUKFIrFkTu3MUmVRE+mIc4FqInqQMjnDEZ/BsJYyGOBCyjXz1kD77yHbnqjq4CrELVSFveMZvYNNhs4NDlsSP0mQkD7fvgQ3UBI+4qbI6lLtoP5XK8HJDdKy02Ht4bcs2NNBiCTy+ZVNDLnnew7s7a6Wv+EXmNbuXBgBBWukO2a1x3JuG3gO/Jf5nvFDsR1uA== 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=yvludC8vWHTIQrZU1jnYBoJjTbwpczjS59o1b4BTytI=; b=mFjEWT17DrJofXStoZeJa2KwLzkbux/M1nQB0D77Cd1Y4pN7iYrpVFBgKC/3sIk/It10Ltp0Riu/opjGyTU45JWIIDv0LMvc25LFGes7XWzNFoVmdyby5RtG4lWCC/6oMcoi2yj3TjUqUkPUdKo5CH4tBC+uJwEf9TVjQRgK6NO2A06+LBdSx4Jny01/xx3eSE2MdkvUdGNGqWAkSTinIRk9+v5qUWgsAGUIo0ueQIkuXG2xb33H3vrEN4qUzg9LQjxS7cZPLCHQw7jkRUaXsVcT4M2zs86+uLBjF8SlZnDwESi9E8rjOHHBX9uAfVJseMm9D6D11OXiJBvBWkn0Zg== 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=yvludC8vWHTIQrZU1jnYBoJjTbwpczjS59o1b4BTytI=; b=XWfO4XxTjhaAzi4fsNTO+Tmsi+ydS38rN/6MoTfwbAh6a5xjgJ8AWtkYbvvmc6jYhA0tje46tQUTHrImD/6sZOJwV4iDSOlpHsUXwQatQvavGuSzttGC2dTLZUTVQ5Zf7vdTKBiAF3iDx79ja6+HdVepXoe5ITA6nl1QLvJQEdHmABYh1TqSjmk7oFL0F8j5csn1UTh8OkqyEsicN3klmQmfwJBUv7QGHvWi5N33ENuAUU5jW5MjJe1BNEUeZyj6KPyguGBiZn68ZzrPKE3BbZe2mnYbtbgnkoUrsr+yCct+LUr5qFp5fKdIQ7DJmZiQY/FSFbu69z0+wcn6K4NO2g== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR0302MB3317.eurprd03.prod.outlook.com (2603:10a6:209:25::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19; Fri, 19 Nov 2021 19:16:59 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51%9]) with mapi id 15.20.4713.022; Fri, 19 Nov 2021 19:16:59 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 20:16:49 +0100 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [ZI/EWIPKdGFmDMjoMltwjRPjHL4FpRBQ] X-ClientProxiedBy: AM0PR08CA0001.eurprd08.prod.outlook.com (2603:10a6:208:d2::14) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211119191652.1025931-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.12) by AM0PR08CA0001.eurprd08.prod.outlook.com (2603:10a6:208:d2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Fri, 19 Nov 2021 19:16:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2df4b8b1-a551-4bb0-4bf3-08d9ab9128fc X-MS-Exchange-SLBlob-MailProps: EpEO96k6WolGhf8HUbp7Tbhr2SS12qUIuC7q5u6lssN1m3G2Xc+PleAnulf+UoQdGEIGfGHO1j/6b93TJMut4u2YxkvMTwqi8HcjjbC+0yDoKJLE4gCwYtDqfvcxgWs8i2jTCQ8w9jZzZPioDI9B5jnUoow/6RwsJU1UKJABpnmvsd9Xv+lQrqR535kIw4Orc/rGBuW9lNrycBdr/dM92fLjG6CqOLU2JI1G0UG0zZuJ+WMVi4FtuDC1qXJXY3AwqVvvoi5NmVrNKLUzGnl7Gcyt51sQDamWsJ2X37K2HWnD2zI201gjlJDa1FB+EDHULNU2q8lDN2ZHlaPwGWg09aLDwCwmuxR6JOMbjcrOzYnfUq5LEdAkbq1WU4EozhWAl422iXkGhSo+m/7Qdlv3mfjKVkzt3ytRnRA1Hx1Rt1Vw96BlHRoyp2If9y7/Jc/zgQkSD6UZiJsnddKGQsi+2Jq+7QZ/PhfO3U9OjMQidDfZhh7momQotLQ9Fwe8glLxV62uz5XXkoUkQ7M7/O+oDbXoJZ0gIlP7NSLHh4BRtDlCCvSBsr/idQAjIStWtjORY4t+wyHZSeEY6kNwsdL0a0TiPneCqldqperg3rkdarhLUY2Gvuvr0SZrP0NV/nW/0W5yXl3UJVVcxj31HS8IC65OACRKj35pwzo4k00d9bMX7Arg+ZSgN5GJpAJYNzBTVdiRFvBBXNRcDwvJIJSZ1nEgDUQx11XnNx0vDnFUZWLkZ/1+mLzhC6YNSXktah4/v297X2R6He4= X-MS-TrafficTypeDiagnostic: AM6PR0302MB3317: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ep4Ul8/Wt09XzfaDQL/PZUwM+myEp6Fh3rnzVd16g3PjBQGkFhffA6f9my2d+ROosag1Fpo+xC04u/0YfMKUF0Am66/u5z1nPSKihDQ+txc2LFskZJdELSmMWS2QO/6E4L8XaQ5eRC3aUtRUccxNTC8gYXc/pVeKLYHPWPWV6u+7AR6/3l8KFlUj+1c0vMoH9zcRBX2mVltnhCrPOqgr6mr5U8zKkU3vW5db5fOfgJC/H6woG0WeTDqj4Jsq+cn1FaNCm9c913yH1nYuFSkArucacMkWy/L9mLkQWNxnhQbVXAePdTigE0ZFlBbxAXzertGKGs8Bkjy/eLuB1i4qBHL6CLg57fUTGcWsmPofvhim0z8uqrQ9SDorGDifvU1AS/4J67x5U0iG53257ShpYb1Abfkz8UNVGubz0h+IiChNSoHcUm4UioThoGBOXo5TT7XCswLr4yfaHe+KdVDFMjDWTeaSVrQXgJY+JX3FOvxxJ298XKxThEhXvBb1/+ZuyJIjtA1jBagcPJZhALIHeV3VHjrYkG7mqk+8A/uog6yDHDioNj4G7ClRd7WpWF4vEmI193wwaB66Uy3/RQ/8pQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SaronUo+vfD4NMXx3fzr3Adb+SkkJvRDzuzdlDHlNnTZNusD5skhfObMtqAbYzo6XmBzCxkPlytaG0tRRdQVb6SVfW/PZfEVzDV4Qu4wk1UYccSpa8OkphZZX8ldtljlgK8uJQZmNvahDZEvXFnx+8WgW/87OqvgdJv/KgDf5+Pv8Gz0jeVbEVlEW+bGobFMUUxwQpz/XFDXpozmRlkO1cyoqTl/RGOO89QMto9kWvxNSr8oeRiZS9qvd9hozHTzLE8vWr3gfsl+hLwQ02rsWpiejEqCupsY0eKdZ4lQfwPV3/oRMq1AeCJlGlARoJZ8vWgc3BxSEcLSbLC6N2CDAR4cSWo9F6o9Mvrz530wSHlsj9g8k5dhCZnnoo6OakzG+S0UEBVjLHhf3tbIxfVqeXcFVMB/dL0Tfo9cLBnksH2AeVeeX+fzNJfFXQvimPtxk678aTSAHknMivdbvb5PR/nQ9vHNpncTEUfszPnKwTLO+cJfanub6aWlSG9cUspoiChTPT9+663vWhWAUv6fMQ4f0IdwmVqGbXH/b4V0rS5pXpWTzyEFQHgmFCWcSB3wIw7JRPbyuuyF2bpY1B9alMP5GFT6eVrb/L09EONkaxna4cDzf7Pf8Oe0RjpVuqRtelqOclZLnY2zCf8gt8WZh0jGvewNeUbSz3P6hERcepSjwClc3Fw7JZOfKklglApgcD4XT3R2NVU+44+4ewM3bA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2df4b8b1-a551-4bb0-4bf3-08d9ab9128fc X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2021 19:16:59.8066 (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: AM6PR0302MB3317 Subject: [FFmpeg-devel] [PATCH 2/5] avformat/dashenc: Don't use stack packet 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: VcpfjP4cl7xw Signed-off-by: Andreas Rheinhardt --- libavformat/dashenc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index dd2b34afbb..3f28f5ad71 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -2342,9 +2342,7 @@ static int dash_check_bitstream(AVFormatContext *s, AVStream *st, if (oc->oformat->check_bitstream) { AVStream *const ost = oc->streams[0]; int ret; - AVPacket pkt = *avpkt; - pkt.stream_index = 0; - ret = oc->oformat->check_bitstream(oc, ost, &pkt); + ret = oc->oformat->check_bitstream(oc, ost, avpkt); if (ret == 1) { FFStream *const sti = ffstream(st); FFStream *const osti = ffstream(ost); From patchwork Fri Nov 19 19:16:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 31509 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2862492iob; Fri, 19 Nov 2021 11:17:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFt/bXy+c3DuSSjfnLSQTLEukRqGHKYEZvZpJ4y4AWnZUS9Fy0QeFaGTwLqR0A516bxaGB X-Received: by 2002:a17:907:9607:: with SMTP id gb7mr11000912ejc.441.1637349440334; Fri, 19 Nov 2021 11:17:20 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z7si1830102edb.427.2021.11.19.11.17.19; Fri, 19 Nov 2021 11:17:20 -0800 (PST) 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=FOOQmlSE; 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 5C21C68A6E7; Fri, 19 Nov 2021 21:17:13 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-oln040092070048.outbound.protection.outlook.com [40.92.70.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3147E68A764 for ; Fri, 19 Nov 2021 21:17:06 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q+4jg45QrPAqJyeWEIuzlQX02TboQEnof3BKuKg6KrijxxqHY2DRkwEzTb8IX0xROErwJv3eSHr8YQro3C0cRHLPgnrehJS193q+FCtpMzrqgw9u0yP450CoObFRG1gCr0ViEnQ/k4uR7EC+9M0MWiHMtzCK+Q7H0bE9JfFYUQML+7QkvRplYofGhuCby9oTkSLik3kjJ0SaKGjo76qfKcqqhtnliByumiE9HwOX0pV14WrV2nfkHnuliGyCTPAs2uFxFR7pCqzl2JbnrcTPPUzHmRn/7341Ec+0Vs/q9dAo9MjgoSenkco81Pl9/p25yXM84kPvizgszqnmv82Rbg== 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=vkfm8hLo8OnDqSLng0umpatYbCFtoOVpunBGi1scwls=; b=Q895ztVapGKdaP9guSUwQhgoE88jxN/AozPjNnKWKvEtSu/jjB4YPyojut7c4sqW5kSWiNbIfpB0nqSMouv777wWDIm6GR40L7A4Gthafb+ZKTf88JPQ6VOfvVYTYzFP8owsFXXOYhy97EB7gRLlLsH6OfLWQZHTaZYiUDxZhKqprKkrz7hBVveWZaj5To9ns1WSMoCxRooCeAoxFktFK7IXL2HpSFU4NGflg+7VZLxS6v9/1naeKQiMBZoM+UckfNK7Z0xs+Jr4vApVD82viidj7+SqNWMSj16eLolDDiz4VjrwUN7mVfQ3AVF6Gg3OyZuZ1uXvK4ve2jWhdxaF7A== 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=vkfm8hLo8OnDqSLng0umpatYbCFtoOVpunBGi1scwls=; b=FOOQmlSEunB+rZdte7q2JUpmOY7zLCOIOZjEk69YyyWmmH61ilg7YL4/TLViRKXh0obeH8wpGgtXyg0OYNt8gjh9RIRSFPPST0sZhDUOMy+Z3YA7LLhnoP+fvRg3tNdvR22K+Zg2XN2asrK7Lj1uvMpZNE0sc4I56rI6qkHQc/MJl39WITa8mBOWzVc8AqVEY3UEOER6nKggsjoQo2Kqm8eDzNaNnM+25huTMkqXU6HTFGSj+qnUKP3QJFy0GEygXBKNlgnUDIs2HjMZVTm0K8yfpPFsWVCp7l/wzVJpraLMAwRL8ANoD2V7By0Ct3X+YjLvBSIuieE8BZGr75VE4w== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR0302MB3317.eurprd03.prod.outlook.com (2603:10a6:209:25::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19; Fri, 19 Nov 2021 19:17:04 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51%9]) with mapi id 15.20.4713.022; Fri, 19 Nov 2021 19:17:04 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 20:16:50 +0100 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [QZMIlD6JzqUJSyKphaWMJEzvtvZ672yS] X-ClientProxiedBy: AM0PR08CA0001.eurprd08.prod.outlook.com (2603:10a6:208:d2::14) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211119191652.1025931-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.12) by AM0PR08CA0001.eurprd08.prod.outlook.com (2603:10a6:208:d2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Fri, 19 Nov 2021 19:17:04 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cb1dc6cb-c8b2-42d3-3332-08d9ab912bd7 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNUlUbzXBDZtlJsbJd/SSpZPTVD+cqRgdh19Xu37fk+E1wsCh78s+Xo9RwA6LYe3krcCnMjPK8csY42XzCr9nznfEEFJbhllnskR/ngN6/wAaGvENy6sbxN7kxTUP5CqdGbHCcFp2cxV8Jpvte1FnREeB+uthPtH6G+jEUK+KFbEY2PiIw8M+XuggMyM8A5sZTv2+ce3+13fFpvQn3ivfkxAV92GZwJ1XdKrxIuCjVBBTzQldVCKXRcpo637tQlJB5Ysh6NFVXad8//1Fp3/a+6Wg3yAwGldyCpraxqSc8ENVX6OFPU+bAggIb30yYlMmtOSGj6KnvBZxWoGgrNC2GSwH4+DZxCnSQUYFrd2utcEYZSeDVOxlyiz5PEF8pbTyd/OJVJwlxkoIx6Gm6VRsP9iP0Tp0GY5kpYIvG4yU1e7CWa4+TI+vTtgnauY+W9ZGvKy0GvatUgn9uyOG6gFkG1mTMVIpTia03e3ieGSiPyEIDStgZUi1SbvCNaxKGkVhaRExigEq0oIdKCfeoAzo1IGA9NFvRhmBvZVQRIApGDBEysQAMf4zA7U7CDkXB6ozL1ystHV2RNUDMdZQ0zX5M21CMSOqbXytFt2ip7fkoh/0g7j2apk+gHf0J7o4VQ6ggZANtRp3u/g95y0eFswpnA1cD15yZj/8m6P32Y4D++qE6csfZLyvb0IiaSLEmk2Y18+E+B0y+yzKQwJ3+f64rTY+AusPBb/uKw= X-MS-TrafficTypeDiagnostic: AM6PR0302MB3317: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UwZMeAkpSIPCSVN8rcdu2jxTtFjqmo6aWi+5oLfH4G3g5A7whB4q8vP91R8c891S0AMMq4CMnFEu8Ha8KAbFbbeXBVL35vDGqzH0DimUCOOjJVshdlTHuZzkZFeEzF+OzIaphom/sW5qVBxJdB1VxycS3+vCZcgGm5Ml8jQohSIfGAfypQZ9pKPNFPpC5mzjxBIn+g/K5zclLRQ/7aZLEgZ0Iqhp32j0FiTLXK1O6ZRvnFiNkNM+2bzlO0dEd0AhEH8j6Le+eL5PTadQoOtkv5opMZL7wrYYQDVfDO+x2K/2yMuo01zQ5PUL29y1lcKTIaT6S3Jgv9/rpwb/KbODKakLiRh75JMbhjl5mlHmXclRzFmk6lqJLCcX+PUKlZ45FeL8BGLjxyYLEgiTIGTAZIwuMMb4cBxLzFoV3KaVpbOf9K5qpNef+WEkDz9nUyIza2zoco5x4pgHYdQBVmQjqbqAi7D/+/pPhwJhXyKy9vnXQ9fG+Prp2XTvz6Mz0rAXZoRfp25o7+IZPFLZLLhT4x5fn29o4hkBbvHR2cZ72CuF0U3ecSKegEvO8yoBgkDy1PjLAZG/Fdw7qcsqxXsLAA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0bEt4KtbrdaflkVa6uOwcA3TwTsOEj4KT7uw9Wz+rinfK5bF1gJTwZp4dCFWRxGi2gGJRN+jZaJwtgLSoyAkz65ziw/YoHTxmFNAy3x+3lqmYRitGhNazTZY9fUWgSOfYWPKG1DFqmleOGT4rtf5jF7vuRDaSeBYg5XNdrZdkiNsdanmp6GxJHwtP/+c3EtSt7LxwwMONTpq4foU0h0LTu4iAxCmcxu1QEN9al83A5Y3aMwPZmH/Ovyfl+Qjxbw7XgfULmvomH8mtZsmva1gf9srGeP0ikahqzF1o9AG5P6HLeGHPefWJ/64Q7/TY+W4RoQ5W4Ab3mVb2PNlIyDItdrEOr6zEy3MTiLM6gk5/y5//xpyPD3I6W+4Sk/yRAOnFxDMA/tVA5B8JCpVwFDnTpF4caRK4BwLYinFMzffk73XqdmH8MshBhPVMJ7IbGmNQ266y5wgi6nynlxhF3j39D/6S9VaAzisv/LWRSFe3pbFlKWnA2Dyt5i7RofhY8v5CwEuJgkX3xdSbay6RHirrDcrZxt1dJnyEY2AtOppR93/FGq2PiR5u1K1iMQ4ZXW8+czVKSvFEcU2PQ9srpVdd/dWrDW523tJ6j9exTB4KuZfoL6jMpzItTxMw9FgQmD1ILMxgA1jA6wipOF2BfWcW5ldnriZtjmWz3BfGObSrySsZpNHQihKVw1zEPw6CyoiHTf1V+BD7egBK0UapSkuZg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb1dc6cb-c8b2-42d3-3332-08d9ab912bd7 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2021 19:17:04.5937 (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: AM6PR0302MB3317 Subject: [FFmpeg-devel] [PATCH 3/5] avformat/movenc: Avoid allocation of AVPacket 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: 9mK2Q3d972RZ Signed-off-by: Andreas Rheinhardt --- libavformat/movenc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index fec467979a..caccf18dea 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -6458,8 +6458,6 @@ static void mov_free(AVFormatContext *s) MOVMuxContext *mov = s->priv_data; int i; - av_packet_free(&mov->pkt); - if (!mov->tracks) return; @@ -6569,6 +6567,7 @@ static int mov_init(AVFormatContext *s) int i, ret; mov->fc = s; + mov->pkt = ffformatcontext(s)->pkt; /* Default mode == MP4 */ mov->mode = MODE_MP4; @@ -6714,10 +6713,6 @@ static int mov_init(AVFormatContext *s) mov->nb_streams += mov->nb_meta_tmcd; } - mov->pkt = av_packet_alloc(); - if (!mov->pkt) - return AVERROR(ENOMEM); - // Reserve an extra stream for chapters for the case where chapters // are written in the trailer mov->tracks = av_calloc(mov->nb_streams + 1, sizeof(*mov->tracks)); From patchwork Fri Nov 19 19:16:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 31505 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2862697iob; Fri, 19 Nov 2021 11:17:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxh/MdP2CPkHVc/dtZbMRdPdpRbR1h0LC3uUkytw3NDrt9hxEaHXi/0zQIALBSvukjroKLM X-Received: by 2002:a05:6402:168a:: with SMTP id a10mr29089387edv.219.1637349450909; Fri, 19 Nov 2021 11:17:30 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hg2si1921589ejc.416.2021.11.19.11.17.30; Fri, 19 Nov 2021 11:17:30 -0800 (PST) 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=V4Pc33iu; 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 7FB4468A132; Fri, 19 Nov 2021 21:17:21 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-oln040092070084.outbound.protection.outlook.com [40.92.70.84]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2C0BE68A132 for ; Fri, 19 Nov 2021 21:17:14 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NuL8AaO7o06O603F1rvzDNcbP3PCIEQLxJRyQXFJZ2tFQJBFgSrNUBWNQzt13KfCtjD/9zQFN3Mie0Q8Wn+RGW50tVKFUlSVbkf3dQoPp9QqIM++b6iWrsxko+/IMxYIyk0ugJRYh2+p/JiVTV0iza5g44BFpJbbpq9Ddj1GHv+4Lkl0pA9bQKaGAHRAVsv1D0VeRll0fYM0BWZLhAuIrjYgEhSVTHrlLrDUwpmBsuargLa98VkMeQ0RQwijFglPB/O5dDIXdBHlBx8FHRB+C1/YplQpnWJ50vvT0wEqpZ5hxcjUq9Z5Mf1eFKDlbFSlijvCrBduCf2UITcT5q1X5g== 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=lHHdL8HKulDQtfDn1EqFw9b8zpNGO0B4cn1iHAVePwE=; b=REyWztpVMKWG5L8ZB9kQLnqLEig585gIxX8lNPsSI8K5f2ROFkrrx7OB3olKFX4D4oTQ6YWl6i66YIyj/MDFMWpSOBYt24f2hC04pymFrf+Sxa0mjYmHZe6+YmBhh1aXND5fPM6gMbdRNCewy8RVby5bntFNWH+Vbnk8Wyw4qV1NLEdgn7TBQSSuZqi4mePY2YCaa0CF8CrgVv/OkPWgoHx6TsxgcPLpjetJyyt0I7sotzovEwYpBCXOr58VqeNGcE0THQhEvLJ9SoNppAOZzXPzxlrDGOTVNW00D6VK1kqs5BukTJgNrBgX+KF1t7FDRC1PdbqcqXr7mGhWU7bUJg== 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=lHHdL8HKulDQtfDn1EqFw9b8zpNGO0B4cn1iHAVePwE=; b=V4Pc33iuj+95M+BWLE/DKS4XWXQtrUkBzjFR5pQr0s3XNJVJNWwGSuTR0fQ/nFptsZIzCcMqb1M5XVhf/e2kivhz4rSGuGBOmi3avqFsNjI5DOR5ejO8q0FacV5TD1d+NJO/8df8sRgvymKw0V1OdN8auCf/W/o2xMC6eKMe/Sdt/GgGxu8Qu2Fv8+85A70dZuvlbceyF7rprI4f4im4RaIIXvSmKZDT+73W+0KWqExNNA4MK7Ha/WFq0jfNVoi76ki6QediW13AlS9bAQhlQz2hfi/xCFgUR94THNd8i9KHeCT3+8B7QGCd0sK1Eo9m6TFf9HMNKVFFmRQa/4Fgog== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR0302MB3317.eurprd03.prod.outlook.com (2603:10a6:209:25::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19; Fri, 19 Nov 2021 19:17:12 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51%9]) with mapi id 15.20.4713.022; Fri, 19 Nov 2021 19:17:12 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 20:16:51 +0100 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [T6RQwHYZEGW+5vwwcnl14RcrAQofJHiw] X-ClientProxiedBy: AM0PR08CA0001.eurprd08.prod.outlook.com (2603:10a6:208:d2::14) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211119191652.1025931-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.12) by AM0PR08CA0001.eurprd08.prod.outlook.com (2603:10a6:208:d2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Fri, 19 Nov 2021 19:17:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e00f082a-92e4-4024-3f12-08d9ab91309f X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UKE76TYhWV/4GPn/ptmlETwonHvn8OEIrv+eT94ib/BbWgsLutpRK3PSNjve2fLSuzt0fhPLHRiCAbP6NcAQeRCq7HSwWxakJ0YtfJV1PCk00ABa96li6/zVALqdLHDIhpEKWKlVFu3/6S1aBibe2WcG5Xu4YYvSGvHy7gwzS7+cfPY11Jr38gArz5jDuX1fbR7wmw9C02zY4NimLUElXh4Uwc9meqTamRJ9ohSGzgoZS9Ddv5IJzLkQ9Cf9CzKIXH2UwjKb0VKPiJgAFNmytL2PuPWoh65Oa90FGYXlLG4oOz5/iQHJjqyotbhV9WUb2VtIC/CtQLj2EYF+xI9k48QAbUlB6NmyH/QUYIa7PZcoUFRVQa8XUH9Z7vV77Z3XKuI9Cv3gGfuqEI1eEWd5cgkh1aFRS+f5ONQoN8jRyZhZvSYHsivJPrvOJViPu5fSP7xgHMzYIOckQAxrmUAU8htJ7BYm0IasuNj8xrrEChmom+ZzfpLnlOIdXzkyzPBprSZXDpXXGgzgM50WsZanETVSRpXIl1zUj40ut8TkTxU1RARktqZ0jqDpnev8z5sZDq9XZAEDRTaaPVCGOt1Ih21l04B89ZHr90kUtu+6GwK1riZYbYi16kmFU9P59dZVr2TfYBHL90gzFtQMHlL/7dMwzFNcbP7WsvNrKrGBcPGVDN7I7SilOVckhjug1osUN50IcDKcT/AVw== X-MS-TrafficTypeDiagnostic: AM6PR0302MB3317: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mvx4IoK151rlRlpgDMDvqmULUT4XONz9uWtUP2IZwVQHogbHVrUrL94SPHR0hcX1r3LGJv2GgJl2iUtlgB/8NqJWd47eEzfSf7q8OchzYFE4yy1rh0MuMLF7DeB6Ju49BatXYw2ocbj1nQHbWzk8kakZLHD10rTDxhJJha3EkbELlBz+KI+pA81FpQyvIhEvrITGvxSXmtI1ndb30tuduALP9U4j6tRZcJ5KlrfIz4CbaCHY4rl41xiKSbub7Qxg7pAv7HkR7Uv3H7h5WIjJf3GznSMIZwLYxmdj0WqT2WoCv216nolRfxeBw+DYPqD4evPRpByBZPDYVJ5aJSG6EV/7i0cuQJOvOr8DuOclHVmqWnlqv4REatvLPBBGPWRWkRmFvQGVdR65sQ770ewMEu+fNkQD2c/zPPeFiHGu7Y/iuu4DtIYOq0la3zU6BwVkVIfrAhsQBjlC79OnKnNraW0QatJ6hyjR+8ZfNdGMSgzNsOnfO3nW+Jy/B98ZpcQ2xRkMiRxPjkmS1bdv9lSttzSEMbmajE3O6ONo0/15to/cAof68rTQHhqAhOEd/a/NSZJBL+cBFy6bgHsxaQVvJA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TsFkGBSFT7kV0kEvRTIfwigWp5OcdQS9XBZyZ7Ic2InF8deGlJUwo2EBy2YJJZXYV+Gcz88XuS2MmF2I5bJXmXhw68yvZGobCrOhWlbO+6/YfUX7BkX95eTTk/wVtgvGQpSjk7FDvoN7m2pX7eh+eYOyYub+D2gE6NQhKQCBEMvgvWPYBX0n17s0w9+yZXBYynMAUbz7NfhKJJkagpqSQpPX3qH6kESgFXK7iWVUcHGZa5W0e8+COnbP7kQUIaFuaurLP3ldHHtan/YX/xa8BmQMLahvncFOTyOERp9nVgGqPhSNU+ou44SbiHBHQEmxv0Bdh44flQ33Owy1xzb/Id+tt/L7LteGScSrYdGhCX769uWJ43pyO69E9X8gHSkkBOI6DMMUUGbW4PME9idH5TH9hHKTLlzlNp5X43pqqoEq0INoUjmOlEBK9s8Oes28qMyQYlIa5sXek7te8fJD2NfXb35mM6BYHuVkXMmyHoFQRQ3uPejRvs9KeWoOwyeSnFc8O0Zh36LqeYPoxTiWyTrxCSY1TX0HKqobtCYI21nwCKI6Ww9WWqe7WpXoLEBUm+CHtuNWbd9tZdxijg7neA4+tMcmOyL7ZqE51u0asRWTEDro8V0+tyNmEteYcEV5mxY0eb9aXN3l+ZsPBFkVh3zL8TUPOGWdEGig8AMpZiHD9OLBttKKBuWWU92uN3AFxaRUy6ONpvj1YVLsDNJ1rQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e00f082a-92e4-4024-3f12-08d9ab91309f X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2021 19:17:12.6246 (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: AM6PR0302MB3317 Subject: [FFmpeg-devel] [PATCH 4/5] avformat/mpegtsenc: Avoid allocation of AVPacket 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: taNIjk3isfn4 Signed-off-by: Andreas Rheinhardt --- libavformat/mpegtsenc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 79ec1a7e5f..92b4cc8087 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -1140,9 +1140,7 @@ static int mpegts_init(AVFormatContext *s) ts->nit.write_packet = section_write_packet; ts->nit.opaque = s; - ts->pkt = av_packet_alloc(); - if (!ts->pkt) - return AVERROR(ENOMEM); + ts->pkt = ffformatcontext(s)->pkt; /* assign pids to each stream */ for (i = 0; i < s->nb_streams; i++) { @@ -2186,8 +2184,6 @@ static void mpegts_deinit(AVFormatContext *s) MpegTSService *service; int i; - av_packet_free(&ts->pkt); - for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; MpegTSWriteStream *ts_st = st->priv_data; From patchwork Fri Nov 19 19:16:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 31506 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2862894iob; Fri, 19 Nov 2021 11:17:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEIeY0KNtzeDxpSPgixx3/pGDKhjTpJXOTnFJMFpUDtzYGf/Qi7hc3VNm0MVEilYs+urxu X-Received: by 2002:a17:906:399a:: with SMTP id h26mr10525933eje.131.1637349461567; Fri, 19 Nov 2021 11:17:41 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b8si1252185edu.428.2021.11.19.11.17.41; Fri, 19 Nov 2021 11:17:41 -0800 (PST) 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=dZdRzB7n; 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 61C8368AA82; Fri, 19 Nov 2021 21:17:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074078.outbound.protection.outlook.com [40.92.74.78]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1C88E68A940 for ; Fri, 19 Nov 2021 21:17:15 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gTJU4QJ73mSla28EliB2k8jLjCxX5OWwszVSfOnVMIBZZJCAC7r0JFswwm9Zja5jusU0W16JOo97kNIawsYnGGcA+nbtiNokce60n4OgRAaUWvsTVYS8KRYqnyOav9rn28628y2+mTKqeYX9xjqvvtXOMCeu0dPwq4XNvQAWx1ClvUxlNNYrEu18Yd+X1BOsm2vpQ4gbLUfoituVroyCTUoJ3Sd/gtxC38VmUI0k4lYA4x9rmgNQ9baSkc2xfjisCoinV5KTO8xRiU34o/9r2BhZOykhv/ARCZ9qBy+H9B17BbFB4HJRcB3r9yeO1gsUxMnumWCmAJl0RDI+xb9WRQ== 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=dNSx1mLS0HRLuewBaxmAWoKCV5+ZV8xyrs6UOsAlx8o=; b=dvxAKBLo95JBp9xEfjIYEtyXejhkCx9HF2BYUxY30oRJpJWoejWgwq6g9jWsPEYbbptppLFDJ5nl1cU8D9oZPuBtMeogDRANVLswA6jpy3ps2HTMJnLEGIpuaaoV7Lops6tUC7jo/by/a2zP3lpFh0Pjtx5rL1Jpp4/pVXgPyIda11dAnVPguCitjx+bfbvBXwpRQqAj5gueeMrtmI6tKjKZVvLfE1WEjBzXRYjihlhs2JA3rwahv2rop2GE/arZuV8hikkdJ6vaAcklDj5fmPGs16pobebaYO4zBgBni37aW6qzRaqVWbMZLy2i2g08wTZEc13tl8U0YH5laKYn1w== 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=dNSx1mLS0HRLuewBaxmAWoKCV5+ZV8xyrs6UOsAlx8o=; b=dZdRzB7nGrwZccAtnHV3gWcRpugj02fJITwBNlLxOm9vTpN4htk7YhL1kRnO4vZMONd9xQpn2ox6D3shhwX0/hZAP14nMgEI4hvv2OrKpN1CNt454KK6Tevym3aQiXeFOrmtv/PZ/zUzRfyuYmLKFRoswbvA+NBsQP7UIVqCfCfhpG0pv3Ze6Mf4Nl+vbt81vaSH60Vhh6tp4dW3jWmBAZos3nE6jp9HVjsUBEDb4XqAAtBP2wWOM+ZcH8F3BshzTSzeAiAjNfABh5wHT3R7MOAlmCLkf7Vn1AhRuQBpY6L50YHEX3qQqn7v5/Y0tzi0Z3C7hzv/ka/zFoABge29NA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB6695.eurprd03.prod.outlook.com (2603:10a6:20b:29e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16; Fri, 19 Nov 2021 19:17:13 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51%9]) with mapi id 15.20.4713.022; Fri, 19 Nov 2021 19:17:13 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 20:16:52 +0100 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [drruvPtTuMbA4U/SUhkEN8H5vmcC3Q8C] X-ClientProxiedBy: AM0PR08CA0001.eurprd08.prod.outlook.com (2603:10a6:208:d2::14) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211119191652.1025931-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.12) by AM0PR08CA0001.eurprd08.prod.outlook.com (2603:10a6:208:d2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Fri, 19 Nov 2021 19:17:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a8f0a505-b882-41ec-de27-08d9ab913142 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNUlUbzXBDZtlJsbJd/SSpZPDL/807HvvKlv4Fu6I6BegnRKB6J0iE2hSslL93gW95XUQHjb4UZrdInHqdj9uWbimcgLyLr0yHoSKbn9gVsCcGoZJdkPkzmwX66d3spdtm56wB/ApKJDYz0eKumbtz5YmMB5sAP81VNTKqWeKoT1qp7ins1DJ4cGYQVXvyp4xhh2J0i/76SlbH8Ow/rhDk83p5KWwrUWx77CVCrG68w6OxuE+8f3WFgvigILz2EsBA1JRt0b3N32+0w9tPJANAxCBLJ0+OvsHimNE7Xfmljjv3WN71k4VgrLF+Yup9XFDQbe2BdDhz4YImIXumBMRM0d8Vff4tiAnwpLKeajSm/UCJYI4jRsbKrSevQORr9YpfIygUOiXMbDn78NJqBzo8aPxzKkqqPcl7mHJOKKuvs2ja/jrtryrEDfuHDXFmraTdlBeJU4K1DeFlqqTJFsztCStVKmQX69wFoEw3JKdpRWMx+1gvtL0Lvg/H22xRN8xHS4DRDLoRH7DYffhgGUva8JjdsmkQaVtXGQkhrDJiJcqHb3zMdGJg/iuKlUnCXV5nXsacuseCeRPbYLuayCR1WQzqpWkDo0QICVVxz5DpVgWhZDqz3kYee3TDArl7gqRtswgDvYLQ1YASkMTl4fq+ouVBxT5ylFoE1ERY3f0pb3VnOadEWbYK0PBrmaemBmswMnFbwBlSfPB1Xq0/Q7Dc8TAQmLaMD+uUk= X-MS-TrafficTypeDiagnostic: AS8PR03MB6695: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BPqeU9uKjZheZS637vfAUeOLxo/HYG3xnDeqyqA+WlEmf5cn+ECs/pFOStUGBqvCjPvgR40i10ummglhNk5NpSThv+3od6Dy7fhprQuS0gK9VdFTFprmMGAroZzIWbBj8ZiDPjTgv+iLvsHwykRaFSdmp2cNdaKCC9Z1k2vOV7rFhU2WaE83ookVNbopeSqYOgpfq6dMcKp0CrYLT8xmFwOPmYotrJDLDZzN/H9YAib7/NrzyHlukGfCLZyxA24IzomnDXBk0JV+p+gNdO5SUUywfo0GGdJ7zj9MdFOMSsdEBS4y7OCPRTklnUhzI2bLxKr1ytsOZiE1GTesk7G5n1mHoWnCaFCE3vDR72CUoTxAFCdvQJORcZvptMIrK6h3u9VuhCjC5udchrY4W5RdoUxPpaBQ+V29PKrOt7sMt4ETXewp8BpPmID4xqHJ1nLbMxs8A+zGeVP5OC4asfdKv0obBCVU7N5B8AV3zMgbuOux1PzLjWAe8mBmQhTpXFAhYKWPkHDkwg2wVvj0LhZesAk0Pscx2v25hHWqq3YVM4iLX3in4m0mSIWrWbPknha5rQSyQ4g9zPELO1ujZC3ZTg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vFM7fEwtJ5gPBBW6+ns3MYE5YCGb7/2Np9yBCnFOWIoi3zBv1pW9ZnkdzhCbsCfmQP3sPaZFnPnO0dqK5QSlrTacGM8sEm0A7qzbLRl34u1Oaz+lHeqjFNukc0mWVxDKt1F/B7Mxwt6SvXZk8t0MgoxrUVN4owcPm1fAuWySkh95HuGKmzKXXKFETpAvUdW7scMAJjWxntWW+tqQ1MFx2DKP1y99Je/G/41U4kMhFHbAVMk7vVYbunl7TK/lG0/4ujmJ+ctxvcU4vAgXWaCsE7E+906qJTxIOMKcwcPpbizG3VhhdksPbY59ernUBk8gaDQeyRmidg6NLkyWPpHcOHk/TBCW4GmlP55qFX5z2mf8Yex7nBEKIj08gnExfl0mUoAzSIiw7Ic9yvKZKfYwzsQOl86Z4A7DnN7gBZAbLC0owsJ+Z3fnmpFKGCtbm7u/0YhUfO3QAZikGbAT+7TeCMGumgLD7FbekTBUwHZN9AO5SJA4CjOtUshHXmzcG7N8uZzKQxr8BP1O+ZNR6OlA/+UYXU9zbAknb2sEgp1+2Ju0Xm75zDMfZiwFc+fY43ybkMAfsPuUkoDCsnPfDWS4Fvyk92MWLxT4EGyLwQbGgpl8cztgOWNAllEXoPcfQaXjtjTFM7OGLt0WnF2JG6xiXLw2RGNDeF2PXnTw4si54Ytefxl6xtbhpSPFNdfwj5X453o2tKRxpl4XOPXmmRmIpg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8f0a505-b882-41ec-de27-08d9ab913142 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2021 19:17:13.7228 (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: AS8PR03MB6695 Subject: [FFmpeg-devel] [PATCH 5/5] avcodec/h263: Inline constant 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: EWVP0KaL+Hi5 Signed-off-by: Andreas Rheinhardt --- libavcodec/h263.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h263.h b/libavcodec/h263.h index 491f2e0aac..70fd1ffdc0 100644 --- a/libavcodec/h263.h +++ b/libavcodec/h263.h @@ -103,7 +103,7 @@ static inline int h263_get_motion_length(int val, int f_code){ int l, bit_size, code; if (val == 0) { - return ff_mvtab[0][1]; + return 1; /* ff_mvtab[0][1] */ } else { bit_size = f_code - 1; /* modulo encoding */