Message ID | 20210204191005.48190-4-jamrial@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 97A0E448077 for <patchwork@ffaux-bg.ffmpeg.org>; Thu, 4 Feb 2021 21:10:47 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8668B689F00; Thu, 4 Feb 2021 21:10:47 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 871DB688291 for <ffmpeg-devel@ffmpeg.org>; Thu, 4 Feb 2021 21:10:40 +0200 (EET) Received: by mail-qk1-f174.google.com with SMTP id r77so4400520qka.12 for <ffmpeg-devel@ffmpeg.org>; Thu, 04 Feb 2021 11:10:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=WkqeBlLwUeTVJH7fvd5MmmzjgHpsfsWT5GxOlr3tsCo=; b=a77PM8eoGHzjbJj7gCuo92o7OF3ojj4UUSZ0/Qep+1/PTiE8NbjvL5Asc1ViibX3O3 BqW8ELSeRW7oVOQQLvfhF1uhvsxsQw76KZXLs4JXn+Y27V7upjfnJM2txry149EnJXem mIs8IsD9/FEfK/btl9s3x8FTJE48N3M1SGXAf4U6AzuYTtAcFR7bOsrw35zMPwisE+C7 ywfcR5SpHvOh50gbvRCRUCnFELg78lgi6TyNSW5wW8b3CfpUBYikMliUr0M0A2r/7mEf sSwAul7KFeZJeSbyTjwUPRUAykUr/P7L2caU+wQkVeBn8Yyl9KPdYfhm1wJ2PfDJFy2Z 4UYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WkqeBlLwUeTVJH7fvd5MmmzjgHpsfsWT5GxOlr3tsCo=; b=gGEnH4/wsf2g5OWP2AMp9DbCbHDb2inN7TY/3w742GoixbunpLG6K11L7frZN3XRUY A2bNFYRXINHSRi5+Btil8z8KIg0uqSsV8ClL8tXCCx8RLV0dGqucqEy8mZJdtGoqYMzE psBphCcMG0gRVmygEyDktvSq3j/SCVW+4oahsl42696DzLrQ4inxB2XCJD2fK7u9hW7z U2y5ibjzs++gR/OdkonixYq7KLNidgCnsHNecM8BXZpjT6nCPW4wJY0ie/Znu9kEeqDf 9nqFmmQI1u7SanfCPn3gO5LTvkJXFiH98TD3vweJRqY2ECDrNSY8GXbRtbgiJxdjwEFC CXOA== X-Gm-Message-State: AOAM532bdjfWIh4E4zgE9ng9jx06QyyQNENOS6GAShKDxqr3ICHMrVbN oW5/BaHhavWdeNugcyVUnzaKRexdlnM= X-Google-Smtp-Source: ABdhPJzLHEAs2TWCQd+DPMncQur7hOrqWQJ2kjuI680Rn+xYniPdt486rp0zhhOdoHqlAGzJdbI8eg== X-Received: by 2002:a37:b15:: with SMTP id 21mr645815qkl.330.1612465839073; Thu, 04 Feb 2021 11:10:39 -0800 (PST) Received: from localhost.localdomain ([181.23.64.183]) by smtp.gmail.com with ESMTPSA id t14sm5889291qkt.50.2021.02.04.11.10.37 for <ffmpeg-devel@ffmpeg.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 11:10:38 -0800 (PST) From: James Almer <jamrial@gmail.com> To: ffmpeg-devel@ffmpeg.org Date: Thu, 4 Feb 2021 16:09:18 -0300 Message-Id: <20210204191005.48190-4-jamrial@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204191005.48190-1-jamrial@gmail.com> References: <20210204191005.48190-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 03/50] avcodec/frame_thread_encoder: remove av_init_packet() call X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> |
Series |
deprecate av_init_packet() and sizeof(AVPacket) as part of the ABI
|
expand
|
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c index 83229f620a..9ae9d72934 100644 --- a/libavcodec/frame_thread_encoder.c +++ b/libavcodec/frame_thread_encoder.c @@ -72,7 +72,6 @@ static void * attribute_align_arg worker(void *v){ if(!pkt) pkt = av_packet_alloc(); if(!pkt) continue; - av_init_packet(pkt); pthread_mutex_lock(&c->task_fifo_mutex); while (av_fifo_size(c->task_fifo) <= 0 || atomic_load(&c->exit)) { @@ -107,7 +106,7 @@ static void * attribute_align_arg worker(void *v){ pthread_mutex_unlock(&c->finished_task_mutex); } end: - av_free(pkt); + av_packet_free(&pkt); pthread_mutex_lock(&c->buffer_mutex); avcodec_close(avctx); pthread_mutex_unlock(&c->buffer_mutex);
The packet was allocated with av_packet_alloc(), so it's redundant. Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/frame_thread_encoder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)