Message ID | 20210204191005.48190-5-jamrial@gmail.com |
---|---|
State | Superseded |
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 AC778448077 for <patchwork@ffaux-bg.ffmpeg.org>; Thu, 4 Feb 2021 21:10:48 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 95078689EC4; Thu, 4 Feb 2021 21:10:48 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 05953689F00 for <ffmpeg-devel@ffmpeg.org>; Thu, 4 Feb 2021 21:10:42 +0200 (EET) Received: by mail-qk1-f181.google.com with SMTP id n15so4430976qkh.8 for <ffmpeg-devel@ffmpeg.org>; Thu, 04 Feb 2021 11:10:41 -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=Doed7SeA4nFSq/EIfz+Shutvwjbm9H9dR8xp3H4y9xg=; b=rxVCY2rIq7pcNhXgG01La9hTdSDqMWeVQC5+d/uLTFcRJc+LZgOGIn0L3LNLHUWEib iAMj1o3T6dZ6cgxX2XiQyYKE1QaLfwdOaX3KOdJdb0/+tW83Vi7MPr0/YEMkiMd6ML/f ilGYm/De/GECsdsjCRvKB4jezMLNB4DHJtcB3fnOyo0vtZkcEgTyQwlc+PCsL8jWZUcX +s/o8jdK26Yb4vw5bQ3Z9UEW9S8xmBq3MpAtj3gL3/Unj0eqz+pDfH4uxFedgoRp0mjJ VGIcABA/XwN38WgIutyFKqSp5RZSQ1mBh7fp42Vi3U5MhT4yIul91YFPE2Wi4SHMl9Xa xG4w== 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=Doed7SeA4nFSq/EIfz+Shutvwjbm9H9dR8xp3H4y9xg=; b=milJcv7VYWONV9W1vmkM4lSoKyn106uion0rC42TBOSmMowsBkZF1d7n2A4hcYcwSS TjWeKZf97Cz/1UJlZQORcX5HvjxDIk0G6/vySKlHuDSKhKRwApUwRYG2ZkNUxC8gPLQ/ zTZ3ggGOpWeOi44+GBf73CnqT+F5PtgijXtBYle82Us/Q/zk6KWoaN4wdH4oj+2HZQ1+ K0JWCIkzDMY/zEnjwEPoLzjkF0aX9gbftjgGzro6gJrM+M03NrddkSabMe8h4DcWamQs TJeJ3JS1ezC03HnDiNBTVJqkiQ1krRBwvmDr91H8yfVkQjwMGo53tbCy6zU1OiFiP78P rrxw== X-Gm-Message-State: AOAM531lDnkW1lw4ic9gE28FIabkPjjI70357fRR2EJcoq5SI8Va1JFU VzbgUeigHx0MNI2TYJ1qPNMh46PKzpY= X-Google-Smtp-Source: ABdhPJwww7ugj6a/sul6zHfmw2U00OMD2jX6EYMvEumGYd/XREM9Uafnbd6PKhJThbQG8C0LwmAZzg== X-Received: by 2002:a05:620a:1537:: with SMTP id n23mr644557qkk.376.1612465840481; Thu, 04 Feb 2021 11:10:40 -0800 (PST) Received: from localhost.localdomain ([181.23.64.183]) by smtp.gmail.com with ESMTPSA id t14sm5889291qkt.50.2021.02.04.11.10.39 for <ffmpeg-devel@ffmpeg.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 11:10:39 -0800 (PST) From: James Almer <jamrial@gmail.com> To: ffmpeg-devel@ffmpeg.org Date: Thu, 4 Feb 2021 16:09:19 -0300 Message-Id: <20210204191005.48190-5-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 04/50] avcodec/mmal: use av_packet_alloc() to allocate packets 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/mmaldec.c b/libavcodec/mmaldec.c index cb15ac072a..ed51d74de5 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -776,12 +776,17 @@ static int ffmmal_decode(AVCodecContext *avctx, void *data, int *got_frame, int ret = 0; if (avctx->extradata_size && !ctx->extradata_sent) { - AVPacket pkt = {0}; - av_init_packet(&pkt); - pkt.data = avctx->extradata; - pkt.size = avctx->extradata_size; + AVPacket *pkt; + + pkt = av_packet_alloc(); + if (!pkt) + return AVERROR(ENOMEM); + pkt->data = avctx->extradata; + pkt->size = avctx->extradata_size; ctx->extradata_sent = 1; - if ((ret = ffmmal_add_packet(avctx, &pkt, 1)) < 0) + ret = ffmmal_add_packet(avctx, pkt, 1); + av_packet_free(&pkt); + if (ret < 0) return ret; }
Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/mmaldec.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)