Message ID | DB6PR0101MB2214C6024398AF84438EA68C8F739@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com |
---|---|
State | Accepted |
Commit | 4dddcd08c47850fbf3cef2ff6b31f65133856e0f |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp2229397pzh; Tue, 23 Aug 2022 18:40:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR5YN7BDeLZ0ibroL9tp7oQ5tFdpnfls4A9aSasAfgL4xBQ8pQJulDgygmhku0ZDj2aH7qhN X-Received: by 2002:a17:907:a40f:b0:730:c4ce:631c with SMTP id sg15-20020a170907a40f00b00730c4ce631cmr1354293ejc.362.1661305253641; Tue, 23 Aug 2022 18:40:53 -0700 (PDT) Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g10-20020a1709061c8a00b006fe95bb93b3si810809ejh.861.2022.08.23.18.40.53; Tue, 23 Aug 2022 18:40:53 -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=TXPKdHXm; 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 EB2C368B9F0; Wed, 24 Aug 2022 04:40:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2017.outbound.protection.outlook.com [40.92.91.17]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 66D7268B9B7 for <ffmpeg-devel@ffmpeg.org>; Wed, 24 Aug 2022 04:40:28 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NoYpr4LvzSYg7baRqK9Mx3KQvv5Sl3RIEhY0+WFgyIS17ToYeSoDjJdes7Na7iQ2+qsE8Dmp5igR7CHnAv3iJ1pDb6XH0BBF6ZmkQW6+qtQ1d/V4rUxBoHkkPrAXkqkGNZpDRPQEeyiZsWJbDAUPRxGiJqnZcvQsNzZn10gM1PcYaZtBU34OjoffRwA5jDTdToljU3WgtZdip2PEQX6btapwuptZJNAwQSw519ukr9pLyCwg0jeNHaBgtr+VplBSuyuLWOa12WRuDe1gknL0nx6EWAeSaIBw2EacHI9BWLd8zecFxGQ38S5WXfSO8Hz4lz9saHKkH3pBmujn1DHqTQ== 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=JG18cwDc6695YGNhDcWGRnl6zFJIfW70sejrjAUe/64=; b=FZ4hIgCJbHqraHZ2PlFS8qEtQZ8kjEkIuujNls7ss1bLpUwjzTHOgd3kmDO8aN1sfDyZlNUKhYrnvR+ZRf7Ur83bS/jzjLC8OvC+ZiBhiehF9uKiNVD+KWyYAKQMMpZLg5ntCveCF52ca6N7S7s4PBE/oUt34eu3ulLvIpNLORSG66eCBWUGazRWIppZ0nfc97U9K8KJuGQb4Ao2HvY5nvH1Rucbu77l2sMURQvs5Q5pOvaXJnGVNuiMTyb80Ujucp/+DbdTvL+fwtlsGjry6goSaQTevC8Tfr22nIigjD8hVZ1If1jbm5KYq+Xx+46VT+XOukLUHkgyacOmbcCqqg== 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=JG18cwDc6695YGNhDcWGRnl6zFJIfW70sejrjAUe/64=; b=TXPKdHXmHm3Y5PXK9NOlLCMpDGJlFNv4iVRHAS22SyE4bCFnx5wmHui7cdfx7e2C4HlhBecVaV+5R8WzUuIAEowpwrUJytlpx9mJ+6o601YwqrzQxD4l4rgfqQ0DG7CGyxAIIwScDrLHHzvBpzQJJZDtmTWWsQuGHdckdNbsk7d2OeKq5M7mupxpCFMOTz2LAJt0viaw6P5H5ctZb4/iJ9YZl1j1LdBlvyXsggQcuS61ervpdzy2RIExPLNgDze/W6PiT1SMSZKzi2kzw5+aipC7D/P1W+CHQ3FNdPQfNCWcPzpFnvi813JnZou5uAjY6T741MlM7gUxMM3IJdCz6A== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by AS4PR01MB8966.eurprd01.prod.exchangelabs.com (2603:10a6:20b:4e5::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Wed, 24 Aug 2022 01:40:21 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::210e:b627:bcc9:8c46]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::210e:b627:bcc9:8c46%11]) with mapi id 15.20.5546.022; Wed, 24 Aug 2022 01:40:21 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Wed, 24 Aug 2022 03:40:00 +0200 Message-ID: <DB6PR0101MB2214C6024398AF84438EA68C8F739@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <DB6PR0101MB22147759BB89DB6819E1B5998F739@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com> References: <DB6PR0101MB22147759BB89DB6819E1B5998F739@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com> X-TMN: [Qmfq9baH/ZcGcjTRzOD/gzielmuaNdUw] X-ClientProxiedBy: ZR0P278CA0110.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:20::7) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220824014006.2441856-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 91c41242-e44d-4e57-cdc2-08da85719b1b X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKxUnxcm+B0m2g2rXtiL3/xXO2j5FJmO/PyFPN4e+mAvjPByzOX/+My6A7Q0wyEB7mEx93US11gUJ/ZPSQb5QRLJ6X1BYLgIOOJi6NjApYRHYygfvIDCfwfWzdIVo03UWSGIiIoajSkYm3xdm5AN1Um0LP2MLopV36y/HzBwhQ6HoV+zLSyv1ufi+ltPppqXkXl3tHQgiMelO8GiVlAhGP/TXKGZRhocYttAi5alSlcejjhawFPIw4tZmytIOL/SPSf4vhMER9ASVfm40ZC5OoP9fYeaRipjzcLhaAc/4Y+n1c19vcVmJa/wBsRwwXizEX6e60uwCHpJN8pCZcdjBAtcLNBFYTs2E/CX1g9MI2za7uG5D1Kf4lsRmzUOdNp9lQYQK4uURtabckJN2JQcNm0GiMNsFV/Nez3GpP/dX/mmElQniUZOtGC+tlNtAvozqhTXX8Bevg7Ld+XdUrB+wgGQilCiIbNeDmYFxEbkVAO/qXUsdLoJ/yWDuFol12GtFTA4DPGu+5PKfu+rDjDXvfQvpcyk7ZQHaB+89f0EnR+3FlmX33MKYMjEeK/DrAFTiNRYBaEjAdk3ZU0kxJx/3En5Ml6NiTVcDK2DK5yAmqd8kEcbMC1+qSWrDgYi4nhTXXl4A72eaL+kATJ6DiavzxPCpX2ONPe+fq6g0flXAcxiANTvKghfp3RcdeGKWjEn0PvjWbARIKeMMa5qXm/IpmUkTz+0eqStV8g= X-MS-TrafficTypeDiagnostic: AS4PR01MB8966:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: f/1jTGzQil4+qJGe1QVkgUmU+Eyj4qsom1QIKx3FGCpiLgL5V9y91r2znnI8SvO9mmiLHP3Noioiou17ppX0fnvpp2Azi30KIhq7g9BHFisNuXPaH8Jmq0C/vak0otqFYalTylDO3bg8H2uUKoX2eGEB9j9bmNQp0SiGNBp3ihIKzxCb5GFEOVVtcsN9L6ojXz0JdgLbv6Her43XMBtQOox/vsRquZmTaGy3eyqMDI6doBjFVuNV3hWtOIYF9vG6ZZRb/NZcSCWyFtnrhV4ib1yuwyduK09XPVslPDvTbiv40337XJ6UapSugy8P6ruYA7k9bLnYtIxsJKSMI6L4ftT9BgAIOheIyEzlwpPpjFCT4U9+XO2431VT3XAzwBplj+tpME9QNM8Ne0HM+65qmgO2o5rSVu57ZTk3hUZdqVI23YK1RaRotskwAy9v+INaDi4P5rKdHo9FHi44qZkts4pm4o0wWPJ9QB8EP0mHflxhXM+avMYcAo+r//CaWtU2vwiGBgm5rCmVE4ZHH3hEH+nJ/xR5TX2qWRNf2LzsC+t0P8620yRs5au0KxSfBpJUVNgPX7sGFYq7nAv4TIFylzWUb9AB4tvVYJFT4B2c1sR9APnpbi94MkT6kSBYb6GGMoICjO4mbGmZJGKpHEHsZQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NAvZP3I8rW0zxGyxIktKTAeeHDsH2EDDZ0sr6jJEqP1apcOpLH7S04JXBeF3ocQcdsXMybXqBmdHoRISX1ZgvDtOkNy86WbKcDxGdTEckDbRrwNMQchtZ8wPeagJpq6pJgwfyvuZ9Nd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dnGpAUhvwcB88wUZWL93eBbRcmLZ7grUvZSTMwwp1m4Fw6E0TlXHs7JPLy46F+oFuideyjtUL927UdrBuZHjyDrUMNVtsByc7PKVUVH9y85HkQ= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91c41242-e44d-4e57-cdc2-08da85719b1b X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2022 01:40:20.9248 (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: AS4PR01MB8966 Subject: [FFmpeg-devel] [PATCH 05/11] avcodec/frame_thread_encoder: Forward got_packet directly X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: PD3WkeHJeHlN |
Series |
[FFmpeg-devel,01/11] avcodec/tests/avcodec: Mark frame-thrd encoder incompatible with delay
|
expand
|
diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c index 07d310a986..b5765b6343 100644 --- a/libavcodec/frame_thread_encoder.c +++ b/libavcodec/frame_thread_encoder.c @@ -45,6 +45,7 @@ typedef struct{ AVPacket *outdata; int return_code; int finished; + int got_packet; } Task; typedef struct{ @@ -110,10 +111,8 @@ static void * attribute_align_arg worker(void *v){ if (ret >= 0 && ret2 < 0) ret = ret2; pkt->pts = pkt->dts = frame->pts; - } else { - pkt->data = NULL; - pkt->size = 0; } + task->got_packet = got_packet; pthread_mutex_lock(&c->buffer_mutex); av_frame_unref(frame); pthread_mutex_unlock(&c->buffer_mutex); @@ -315,8 +314,7 @@ int ff_thread_video_encode_frame(AVCodecContext *avctx, AVPacket *pkt, * because there is no outstanding task with this index. */ outtask->finished = 0; av_packet_move_ref(pkt, outtask->outdata); - if(pkt->data) - *got_packet_ptr = 1; + *got_packet_ptr = outtask->got_packet; c->finished_task_index = (c->finished_task_index + 1) % c->max_tasks; return outtask->return_code;
Instead of indicating whether we got a packet by setting pkt->data and pkt->size to zero. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/frame_thread_encoder.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)