Message ID | 20240223143115.16521-35-anton@khirnov.net |
---|---|
State | New |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:26a3:b0:19e:cdac:8cce with SMTP id h35csp997644pze; Fri, 23 Feb 2024 06:41:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVPaq50FI5Biv9znNOSUu6Gc2hbAF6FYoKj6Rp6+YcCFV4ggkKue2lcffifKY2uZmXkS3KE82SZQbh0EwrgWNvhZX76fb/dYXt7xA== X-Google-Smtp-Source: AGHT+IFTFSUzWtax8t7GnvPFp6p45TQCgt37rraxZFtWA+GCIiQ5i6WpjYKZ9GVk/7/JYoAzvxcb X-Received: by 2002:aa7:c318:0:b0:565:eb8:ed47 with SMTP id l24-20020aa7c318000000b005650eb8ed47mr4898edq.35.1708699306395; Fri, 23 Feb 2024 06:41:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708699306; cv=none; d=google.com; s=arc-20160816; b=Edh2QhSNiPCbnZSPclwHuDaWRzZeY8vwuiexvC+M2CYftMN7g1QagOF9H+xP39+ve2 EO0U/1AKIS8Kcil54TNypfXKIoasAuE8WEO1ylNUNAzhJDA9JLQosHOlLN0/procd0ZK bBtnbPw7CRg+SVmwgr/QrGZpIbuaxJx0MuE2RT7SZ1+7wEbjjfsncPpQjgHM5Ve46kWO hqmOpEoLriTOzqocWhzs37imC38irFKflY/gMXLR4CnaxJ7BRV4XFo7isGzdTUy1+5bl tZnPZ3LYerGNsVPAf+seMG6dtFKWEQuRtw9uEYQt996dkrN1LwLXhDkjC4uXpDQsC0/N 95AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=UVTHsiOBvyPmdDFjsRF1zGMdPuMGxwhN5DooB2CUsuw=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=S4qG9kTcb0IRDLNAEE8YOTgbI2qI9ezLJU3irQtGa4S+EYaNSJLj6AZBu1VyvobZKt P9mqGK8d+R2WQZW5ALyh3pt+xNtCw/tOBQeLt1s62LPcnpK/9vuciglMXXkOns23/Qs4 AH2tVMgqPwOk+8DkNTNnWSOhM+gj4C07eBaYQ/Dcw8T5sGDmeB9HbgzRFf5D2+FUD4ww 9oKDqZzUQmTNYmU1umnuRXjBcWCRnlsuv13YY+NI++cWRJzoAyyxnYQH6p52GlrXufHz RQwWL85M0Mjr3Io8REL5q9RnG11XHnb29G0pmhD2EtgXYuil+Mc2xyAyOWzx88ujOOv0 r1VQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=b3ZrAtdu; 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 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 ch15-20020a0564021bcf00b00560780137casi6361513edb.557.2024.02.23.06.41.46; Fri, 23 Feb 2024 06:41:46 -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=@khirnov.net header.s=mail header.b=b3ZrAtdu; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 25AE368C7BB; Fri, 23 Feb 2024 16:41:29 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5C8D868C66F for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 16:41:21 +0200 (EET) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=b3ZrAtdu; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id F27374D03 for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 15:41:20 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id VbWmBK-0OfeC for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 15:41:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1708699279; bh=fXPoo2w+fFlds322ZVhiyWPNc/EfLyjAbaEyEnesDAQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=b3ZrAtduvolsWuMTYJrsMJiVGZF4OCLJyD+OcIKNyvJtUaa8gAD68sFEOOgjcsj3X GF9xzvZYJW9NZrmtryRj6R7xFUSXT2XXeKI4zOvC2cjQsMR+hwGZ3qyfjGPDcVOJVO VmugY9aaaLVmXWyYYu1oRWwBEKloeinryQxbRaVpKpt8E96qaq2/l9mOf+ax+F0nRo MJ+vCkO5CrjjCknAb5Ju3kzBYzqqi19FGDl+WnNuPGWEvRCWc+coHzhPYDzzDcTyl4 TlIACrKPAm9xkDgYEyEKJDL/r6aHTlDEaA2metPVvJwIqcknDR3JhMQ1WtwodZGgCz y+3ahUD48cmFA== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id C120B4492 for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 15:41:19 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 6BD0F3A2715 for <ffmpeg-devel@ffmpeg.org>; Fri, 23 Feb 2024 15:31:23 +0100 (CET) From: Anton Khirnov <anton@khirnov.net> To: ffmpeg-devel@ffmpeg.org Date: Fri, 23 Feb 2024 14:58:56 +0100 Message-ID: <20240223143115.16521-35-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240223143115.16521-1-anton@khirnov.net> References: <20240223143115.16521-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 34/38] avcodec/snowdec: use ff_frame_new_side_data 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> 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: H0NjAewWn5Dw |
Series |
[FFmpeg-devel,01/38] lavu/opt: cosmetics, change option flags to (1 << N) style
|
expand
|
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index 70fbab9a49..97aea748b6 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -787,11 +787,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, res = av_frame_ref(picture, s->mconly_picture); if (res >= 0 && s->avmv_index) { AVFrameSideData *sd; - - sd = av_frame_new_side_data(picture, AV_FRAME_DATA_MOTION_VECTORS, s->avmv_index * sizeof(AVMotionVector)); - if (!sd) - return AVERROR(ENOMEM); - memcpy(sd->data, s->avmv, s->avmv_index * sizeof(AVMotionVector)); + res = ff_frame_new_side_data(s->avctx, picture, AV_FRAME_DATA_MOTION_VECTORS, + s->avmv_index * sizeof(AVMotionVector), &sd); + if (sd) + memcpy(sd->data, s->avmv, s->avmv_index * sizeof(AVMotionVector)); } if (res < 0)
From: Niklas Haas <git@haasn.dev> For consistency, even though this cannot be overriden at the packet level. --- libavcodec/snowdec.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)