From patchwork Wed Mar 20 02:12:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47246 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8ba5:b0:1a3:31a3:7958 with SMTP id m37csp120885pzh; Tue, 19 Mar 2024 19:13:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXtT3vbG16+R0XNsKDXK1m7BrnZSQmxE0u+lT32ATI8+OBoDO6jSi+AYTvVEwsguJKJ2cSfg0RFTWpBBV8xYe84zzHkfUTcyTprpw== X-Google-Smtp-Source: AGHT+IFsSpJcvSRc2bAWTfBcSiXcDN+xLYJzluWAJyVhf2e7xHH7rURc1WmAsJLmngJyCSTj/6Rr X-Received: by 2002:a05:6402:3788:b0:568:9934:6dcd with SMTP id et8-20020a056402378800b0056899346dcdmr12384945edb.0.1710900804082; Tue, 19 Mar 2024 19:13:24 -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 fg15-20020a056402548f00b0056b97044aadsi1140679edb.511.2024.03.19.19.13.23; Tue, 19 Mar 2024 19:13:24 -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=p5kOOrMQ; 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 9ACBF68D43A; Wed, 20 Mar 2024 04:13:17 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2057.outbound.protection.outlook.com [40.92.90.57]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6E6B168C10F for ; Wed, 20 Mar 2024 04:13:10 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P+QZ4U3z6pSIbv6bNIdv/eE+T4sYdQFJjyJs81vnTYUPISnu32hfiVA23N+hyfBrUyq4cXnxlI80qArVv1dsLgBStmDzeeJ03PAPj6SF/XPX8aUfLBM9AVSq0YeF/aY4Ohij/2wRItpUyVM3AZDLDxkkQnxd1sGIzQ0QCPVueoOpZFOwQxAJQ+Np8UrcCLc2Iy80X7dKBKfw9ybvo5kW/C+EJhUcRDtyg1pFTinp6xUZo8b0QiNsoaXZjToj7gpsl449kynGZzHc0ok7CZeGP+KilNlJkmGNiriJxu0XWcxXmeqT91a97L0EsFUj+Fh3VSIA+omufWbH5YiWSjmngQ== 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=baFp4BhC1mSmbwoa9OnsSAgmFeD+EDU8g1SO3dmXeeA=; b=Z5C6FZqx5MR/MHKu2Ioxy0+x9jFQQ+q+PssNQAEQnjMgN9hOkZ/n3WNNmAFcz6rtDMEpJe8Uv7rXACH6p3/fX9qjrvcuuNLW5gbtF0S3tMbI8VWj4rF0Bn0jXAw2r/cxuWK1IMoAR9ni/H6gLavfmfIDFxXSfzGVn/0s3qp1PpOBdo05wRKfhoKaG6gmvJgvPkey0AzSACR2v20v8yet9MQKtUCkUvB/4lmHWf7UXaDBd81fiiqO20iMJ9p51PZvRmE4AMuThTPF7SX6m4PuhuPHX7C94WIaOqazdgscmoy6JzejUa4dg8JwjOVpkBjJF6GMAILJS7pInJjdTJOyNg== 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=baFp4BhC1mSmbwoa9OnsSAgmFeD+EDU8g1SO3dmXeeA=; b=p5kOOrMQPQVBOjfug45GsEsrIFr1bTyYPaCqINmMSqwqyNslbiwnIngJhAsjfqPXPP1OMsqYKxpDJGVirxaHxLjDM665FPy/FgZPYqcmUJqcD9noYhaRs3gMbUS+9kwjRGvTn2t076SyAUVS617QXLCasf+E36kVxOi1BAYygke1ncmVdUTS/EybY3sdAaesX8ekdvJD9oyS02D4w9M1hTfduz6A4iUAb9Juy7f24RS7Ui2C/G4oJcSjyOptjpAoFaUeQKK5jv1nKdLYlxp8xVgCw8SuCoVzmknseiMzDRPl2bc84QM46pf8Xgrgr2G5xFfcSAomt031RoL0UVsZkQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PAXP250MB0543.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:28c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Wed, 20 Mar 2024 02:13:07 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::228d:8c6f:ed10:82eb]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::228d:8c6f:ed10:82eb%7]) with mapi id 15.20.7362.035; Wed, 20 Mar 2024 02:13:07 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 Mar 2024 03:12:46 +0100 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [zVcUoDrOQvhpmj2GngkrRmWZdgDk0igx6cp5W5rXgGU=] X-ClientProxiedBy: ZR0P278CA0062.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:21::13) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20240320021256.107338-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PAXP250MB0543:EE_ X-MS-Office365-Filtering-Correlation-Id: b9d49296-e091-4770-6c2d-08dc4883482e X-MS-Exchange-SLBlob-MailProps: Cq7lScuPrnpHlru1h1vRfamsRCbuNA5UTw2vpoVcBvCbpbIXVb8b54I5MD9vmx8Ak1Xn4Q9gdiinDqbfms+LYWRCoCqb7rZI7bJoWE1qDhQxnG4vSP/3ubaf+O8r1/De4WoiNefZLB3FZL+jD9NMJRW6c1Ghtd8AKFFbwEnapg5N+zOpgVq4mmgEHtd0JBca8snU91T69FEDa+PX6VXHXefq39KJpV5LTCk2KRDeFLkhj6OMwwKkF/3kwea83WjJCXjlvNkn7Y6bHZFD2s6h1DHl9PcnQytvMSEaE75gcNVV2Wccgv9Q2hgdcYpah5Tlak1oJMT8I4F3Ygw07K29OtxBpeELOoyEQGNoh9Bm3twQUaVi4WS6EyogaOe7HXd9uvxfKdr82lEXzne3j5+bcsOwtu5Nj+9bB4XfNLPbss5dYfrnbd52LPKFEVTYz5cI17zx1Cnl0TBOBgLrXTR2XYF4o2P4X/zWdi8z35qa4SqbcvFkqJwssCv9L38XJ3ke403fpP6k0qAUPYZHQAPFE9D1XFjJ0es3KeT2oZzidLjU6z/lJsnkwh2DzBcdAHmTFqkqpwTCn2LLuIBkt68ePDukoJDphzCy+aUjh6SJRlY1nHmZFwExe0nEo6tvzWOhIf36whQhNhx64K3031lHGNt5zTs4jraMaq5J4Cf3xsWbCEvCRx6e/YKk1VSWz9CN6k7fEa1mx0/Z7RDTOQ4zZFm8b0i7icgnCfCJSceqzkSEU0kDPU5lIal5VkKLtuUP5CV16XIXfZo= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zNrDQbPLayKdQhiVJh17zcMuIh5tJ7NC888zpjwY4zcsmwlBVVXN0Gx3pEsadWSPY/rfqZVKXs6lxfka6lWwj8wZOuoCbl+/hwr5yujnSG51L1jwLyb8tlbLJ1pT/ZGHhKaRYNo+zwt5giLtemvk4nxKGETkK2tQYIboZBC+J4/nUT9/GizW2Qk/zyTc6qgsQxLuZ++sCybUTOXPLyebkzAEioOMISS8EA39QRUK+LZgF/q2HYEAqscHJ+2yspO5StprjZueSsyPIk/P7eKoCsk+VK4bH4CeQWV1+ueCFGi2WvTGl2f9YkPXmjuR8VEieIqS0LZsmNGBLXoP1zmdtlrWLbzwG88Lqk5bz+ip6p9G92mAZsIku+/2Z785PEcLM2fXGZnBR+dbFLIk0oRNlCEKVjVcexqVCDj9DjKYSyNXA4ZDUQyQU4qyjYnl0LGgg3h2IneSKLfUmmVy5hV3e4iZPGid4RTSPtv8Aze4rQROJotzvaNV1G/nbgXY78FJfuDWEcgAQK5aI7y9X8idJRscUf4tEAxerYEAbcA1eRD27NIbQBlisPl5PfNOAyKOUmI3etb8uyl8lZbof57IOEw4q2fdmUfG/gOflPocQr/pItPXe8B9kHctdwB8Ibrz X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: b32Eqfab2juhkVbz5mz1l2BoNLCUKj2XbR0VoeJAelpeUugNSsL+aGsx3Z3yqv48uVpTDAznhXlUl9dtdrKYYJgxLvdFK9LQe5Yd2ujmKWDo5DMT9ehxRbTlNH3A3bt/Kz1IcoAV8pJOHp63NVFOEJJi8pQenyRpfnmqT7/GnCsr05E0J45x4o4zi+cnaots9Jl4HqOMR+rSUd60SH8XS7Jf79WNt+ELyNBmZnHF4ZVayYkozLcJQWlEYX9CNGtidZ6Ny5KG46V13R33MIzC+UL5Ux9VoF81NXoYRkb4wti1gca9/oQuHfAkIGcOhZb/+/oXPjWbAEpedMK9jwdwF9vterxVt5xaUIgGcuod9RKCTMwBuhBo1KWvvHPPLYwu9eGmgja3JqpiL2254eFqF1M9tUMmmbWG8QbavkeHKomgwsf1xX0ZTjWc7xmfsLpSUyrp8GsmiLkosxLNCcQtMdNoLbjqBwQchdbC8q25rx1uZrNtGdKQ9aDfiHaEK+CjHce0ifXINvW5k75ZS9i42+jjyqnxuYD+6SDvLDoGac/8B9lgo48TTsoNtdmCXjCwvJIYl1IOsXU9wqv9pDG0qE4taNIuaXqGNN38G8OyZNOz57fJxlHUdZ7+DxBSO/D5S2PlRWfFmwEsBehswnaYw7ZeWhgpXm9geZtVl5+shJn3a2QMelJO3xn9hRemB5ZKn4pLSpXgrOsKk58BUL35IQZ0QrxwKxJPo7NN4uexy2LwE64Fcmy+0+tqCuYePVni6nHvah5MA4YTphpVIYQ6D3jywQHS4fakyXOEaQ0FVpUkaw//GoEvkhP8HRlwMBLOqUgW8cZDml6MSVUHns12ie7OKKQhVy8jrJwJjMkrp+FC9FBbgJbI0rUFO0iwHPaS2LrmE4yOmtO5xeT0qFWzdI7TwxRLszyHaDkrG6pH2E5FVpI5BPttiQ7HiZKkLx+PjgGcvvbOEKZTA2QSyQDgpEn+TOHkfTo2pc/ZyZACUA+DsUgV1Pv/nEYXCpeZ3jY+cpiBzboBPNoiZD9Kkun2T9OVwHMpOsiezE0QMGFS2uAbelPCAISr94FiBif1jUywGjoCs/1eUc1PH8janNIj62RxjkzmJyR0xyHyFBlfDxQwqh68qOL6jnZw45rlg8D3EZ0cXYfjdoUsUV0xfbU13yXezbs7tdaEGUr0lDQijTKHQy5JITUwpNOTlswloQlgmTB5tVLwZs4XL3h05f3I+ICYKq2dlKeN+M8RWg8eBRRE2ygjNWmexU5bm6mrCXv34eAXKehp3BkkLhas/EFI8g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9d49296-e091-4770-6c2d-08dc4883482e X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2024 02:13:07.0387 (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: PAXP250MB0543 Subject: [FFmpeg-devel] [PATCH 03/13] avformat/mux: Rename FF_FMT_ALLOW_FLUSH->FF_OFMT_FLAG_ALLOW_FLUSH 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: RMPGjb9/8wgj It better reflects that this is a muxer-only flag. Also document the flag. Signed-off-by: Andreas Rheinhardt --- libavdevice/pulse_audio_enc.c | 2 +- libavformat/fifo.c | 2 +- libavformat/hlsenc.c | 2 +- libavformat/matroskaenc.c | 6 +++--- libavformat/movenc.c | 18 +++++++++--------- libavformat/mpegtsenc.c | 2 +- libavformat/mux.c | 4 ++-- libavformat/mux.h | 14 +++++++++++--- libavformat/oggenc.c | 10 +++++----- libavformat/tee.c | 2 +- libavformat/tests/fifo_muxer.c | 2 +- 11 files changed, 36 insertions(+), 28 deletions(-) diff --git a/libavdevice/pulse_audio_enc.c b/libavdevice/pulse_audio_enc.c index 4955b3b884..3e2cc91f69 100644 --- a/libavdevice/pulse_audio_enc.c +++ b/libavdevice/pulse_audio_enc.c @@ -801,5 +801,5 @@ const FFOutputFormat ff_pulse_muxer = { .p.flags = AVFMT_NOFILE, #endif .p.priv_class = &pulse_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; diff --git a/libavformat/fifo.c b/libavformat/fifo.c index 2a2673f4d8..23e4149ad6 100644 --- a/libavformat/fifo.c +++ b/libavformat/fifo.c @@ -728,5 +728,5 @@ const FFOutputFormat ff_fifo_muxer = { .write_packet = fifo_write_packet, .write_trailer = fifo_write_trailer, .deinit = fifo_deinit, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index e5350323b1..2202ce64e4 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -3205,7 +3205,7 @@ const FFOutputFormat ff_hls_muxer = { .p.flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER | AVFMT_NODIMENSIONS, #endif .p.priv_class = &hls_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, .priv_data_size = sizeof(HLSContext), .init = hls_init, .write_header = hls_write_header, diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index db41d3d1c2..0de4ec1dc0 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -3569,7 +3569,7 @@ const FFOutputFormat ff_matroska_muxer = { .query_codec = mkv_query_codec, .check_bitstream = mkv_check_bitstream, .p.priv_class = &matroska_webm_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif @@ -3606,7 +3606,7 @@ const FFOutputFormat ff_webm_muxer = { AVFMT_TS_NONSTRICT, #endif .p.priv_class = &matroska_webm_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif @@ -3636,6 +3636,6 @@ const FFOutputFormat ff_matroska_audio_muxer = { ff_codec_wav_tags, additional_audio_tags, 0 }, .p.priv_class = &matroska_webm_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 724a1eb673..127673a9e6 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -8239,7 +8239,7 @@ const FFOutputFormat ff_mov_muxer = { }, .check_bitstream = mov_check_bitstream, .p.priv_class = &mov_isobmff_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif #if CONFIG_TGP_MUXER @@ -8263,7 +8263,7 @@ const FFOutputFormat ff_tgp_muxer = { .p.codec_tag = codec_3gp_tags_list, .check_bitstream = mov_check_bitstream, .p.priv_class = &mov_isobmff_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif #if CONFIG_MP4_MUXER @@ -8289,7 +8289,7 @@ const FFOutputFormat ff_mp4_muxer = { .p.codec_tag = mp4_codec_tags_list, .check_bitstream = mov_check_bitstream, .p.priv_class = &mov_isobmff_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif #if CONFIG_PSP_MUXER @@ -8314,7 +8314,7 @@ const FFOutputFormat ff_psp_muxer = { .p.codec_tag = mp4_codec_tags_list, .check_bitstream = mov_check_bitstream, .p.priv_class = &mov_isobmff_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif #if CONFIG_TG2_MUXER @@ -8338,7 +8338,7 @@ const FFOutputFormat ff_tg2_muxer = { .p.codec_tag = codec_3gp_tags_list, .check_bitstream = mov_check_bitstream, .p.priv_class = &mov_isobmff_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif #if CONFIG_IPOD_MUXER @@ -8363,7 +8363,7 @@ const FFOutputFormat ff_ipod_muxer = { .p.codec_tag = (const AVCodecTag* const []){ codec_ipod_tags, 0 }, .check_bitstream = mov_check_bitstream, .p.priv_class = &mov_isobmff_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif #if CONFIG_ISMV_MUXER @@ -8389,7 +8389,7 @@ const FFOutputFormat ff_ismv_muxer = { codec_mp4_tags, codec_ism_tags, 0 }, .check_bitstream = mov_check_bitstream, .p.priv_class = &mov_isobmff_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif #if CONFIG_F4V_MUXER @@ -8414,7 +8414,7 @@ const FFOutputFormat ff_f4v_muxer = { .p.codec_tag = (const AVCodecTag* const []){ codec_f4v_tags, 0 }, .check_bitstream = mov_check_bitstream, .p.priv_class = &mov_isobmff_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif #if CONFIG_AVIF_MUXER @@ -8437,6 +8437,6 @@ const FFOutputFormat ff_avif_muxer = { #endif .p.codec_tag = codec_avif_tags_list, .p.priv_class = &mov_avif_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index b8efc535a7..d8c148bd3c 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -2415,6 +2415,6 @@ const FFOutputFormat ff_mpegts_muxer = { #else .p.flags = AVFMT_VARIABLE_FPS | AVFMT_NODIMENSIONS, #endif - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, .p.priv_class = &mpegts_muxer_class, }; diff --git a/libavformat/mux.c b/libavformat/mux.c index 772f300f16..a2cae97397 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -1208,10 +1208,10 @@ int av_write_frame(AVFormatContext *s, AVPacket *in) if (!in) { #if FF_API_ALLOW_FLUSH || LIBAVFORMAT_VERSION_MAJOR >= 61 // Hint: The pulse audio output device has this set, - // so we can't switch the check to FF_FMT_ALLOW_FLUSH immediately. + // so we can't switch the check to FF_OFMT_FLAG_ALLOW_FLUSH immediately. if (s->oformat->flags & AVFMT_ALLOW_FLUSH) { #else - if (ffofmt(s->oformat)->flags_internal & FF_FMT_ALLOW_FLUSH) { + if (ffofmt(s->oformat)->flags_internal & FF_OFMT_FLAG_ALLOW_FLUSH) { #endif ret = ffofmt(s->oformat)->write_packet(s, NULL); flush_if_needed(s); diff --git a/libavformat/mux.h b/libavformat/mux.h index b9ec75641d..bd3eb53380 100644 --- a/libavformat/mux.h +++ b/libavformat/mux.h @@ -27,7 +27,15 @@ struct AVDeviceInfoList; -#define FF_FMT_ALLOW_FLUSH (1 << 1) +/** + * This flag indicates that the muxer stores data internally + * and supports flushing it. Flushing is signalled by sending + * a NULL packet to the muxer's write_packet callback; + * without this flag, a muxer never receives NULL packets. + * So the documentation of write_packet below for the semantics + * of the return value in case of flushing. + */ +#define FF_OFMT_FLAG_ALLOW_FLUSH (1 << 1) typedef struct FFOutputFormat { /** @@ -40,13 +48,13 @@ typedef struct FFOutputFormat { int priv_data_size; /** - * Internal flags. See FF_FMT_* in internal.h and mux.h. + * Internal flags. See FF_OFMT_FLAG_* above and FF_FMT_FLAG_* in internal.h. */ int flags_internal; int (*write_header)(AVFormatContext *); /** - * Write a packet. If FF_FMT_ALLOW_FLUSH is set in flags_internal, + * Write a packet. If FF_OFMT_FLAG_ALLOW_FLUSH is set in flags_internal, * pkt can be NULL in order to flush data buffered in the muxer. * When flushing, return 0 if there still is more data to flush, * or 1 if everything was flushed and there is no more buffered diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index 69a66f586d..bdd19530ce 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -777,7 +777,7 @@ const FFOutputFormat ff_ogg_muxer = { .p.flags = AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT, #endif .p.priv_class = &ogg_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif @@ -800,7 +800,7 @@ const FFOutputFormat ff_oga_muxer = { .p.flags = AVFMT_TS_NEGATIVE, #endif .p.priv_class = &ogg_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif @@ -826,7 +826,7 @@ const FFOutputFormat ff_ogv_muxer = { .p.flags = AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT, #endif .p.priv_class = &ogg_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif @@ -849,7 +849,7 @@ const FFOutputFormat ff_spx_muxer = { .p.flags = AVFMT_TS_NEGATIVE, #endif .p.priv_class = &ogg_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif @@ -872,6 +872,6 @@ const FFOutputFormat ff_opus_muxer = { .p.flags = AVFMT_TS_NEGATIVE, #endif .p.priv_class = &ogg_muxer_class, - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; #endif diff --git a/libavformat/tee.c b/libavformat/tee.c index a101fede5b..9597137ec2 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -614,5 +614,5 @@ const FFOutputFormat ff_tee_muxer = { #else .p.flags = AVFMT_NOFILE | AVFMT_TS_NEGATIVE, #endif - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, }; diff --git a/libavformat/tests/fifo_muxer.c b/libavformat/tests/fifo_muxer.c index 032af07dc9..222761fed3 100644 --- a/libavformat/tests/fifo_muxer.c +++ b/libavformat/tests/fifo_muxer.c @@ -159,7 +159,7 @@ const FFOutputFormat ff_fifo_test_muxer = { #else .p.flags = AVFMT_NOFILE, #endif - .flags_internal = FF_FMT_ALLOW_FLUSH, + .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH, };