From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 61CF042372 for ; Fri, 17 Dec 2021 20:04:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EDC7468AEF6; Fri, 17 Dec 2021 22:04:37 +0200 (EET) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AC9FA68AEB2 for ; Fri, 17 Dec 2021 22:04:29 +0200 (EET) Received: by mail-pj1-f46.google.com with SMTP id a11-20020a17090a854b00b001b11aae38d6so3843243pjw.2 for ; Fri, 17 Dec 2021 12:04:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hdKYkrQ0cfZaWLOwj5ixJohCvQx8hEwe7EpjbFZdno0=; b=V4OeBg1GxnxtoO/tffs5w/Bu3qIa56zM3G+j+WwmLLdK3c673+QV4JoXL/qa6A8f+R aqD1YCRDRwjfnEr8653QgwLUlVSvb3Li944T27XxBSAGM4Q909WaesiGeBXKCZCPTzHb rF4lEs04XKEWioRhHo/jkZulOo80Y9xUzgNWNHbOgd1d9HrkDWOS1+wicS7SFPARCNjb 8fAj6dKaB5C1p8xLQS0X9wOjTSdd9UZSyYaclTfrz5lvxVzGK+hwnFeFRWW17YtPKixF KgPBK0am9ZzpZ1ATgXqNj4KhvC1PKqMc32SAkZbIE+KPCTPGdY38TX3Jgo2iFjQIC5fy 16rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=hdKYkrQ0cfZaWLOwj5ixJohCvQx8hEwe7EpjbFZdno0=; b=mqnephI1eUROEg/7yE+45nMOaY7maaLzLvC+4BFUoSGzHeaLhvTGYjxz8ehKFm/Ibq 2s5MSja1UG0MTBd7l9AHg6Mdf2xq6TiOLJm9cUIF4PPoS1+9niBRnplU3N4UXz5btCIO ruriKkB49egGjLyzKQzXuOojKTQVvza03nQfKH2CgX+nJxMx0dY9GjR65cS1DiXqeyE0 ll/smExzBXeNKukvsKahoI8rjAxx5HcD8RUoL3EqC5vhRyEA4a20pFvZp1ssVi915yCv /mQ2gEtyO67+yYW1f+BQWh1OJ9AaI/dG6afAF0KZpcKDkKBk+7IaYfI+9bY0HfrEarQp VwOQ== X-Gm-Message-State: AOAM531v6NbpLFr1ZzKhJ5s0oYxdlkP8F2AVFl8m5OlTVC7bhca+PGj3 kNO8rGcGX4kFnxDalbYFqorl6dhJMRVTrQ== X-Google-Smtp-Source: ABdhPJwiUPaLaugAEfxj9JyW3J+5QEND2XyLiq8PwEng3pCi3h7AX9KrKyx7kA632lpSOlQUhU2C5A== X-Received: by 2002:a17:90a:2f05:: with SMTP id s5mr5567988pjd.231.1639771467660; Fri, 17 Dec 2021 12:04:27 -0800 (PST) Received: from tmm1-imac.lan ([2600:8802:5501:308f:68db:dc19:cd7b:1dc7]) by smtp.gmail.com with ESMTPSA id k2sm8767301pgh.11.2021.12.17.12.04.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Dec 2021 12:04:27 -0800 (PST) From: Aman Karmani To: ffmpeg-devel@ffmpeg.org Date: Fri, 17 Dec 2021 12:04:16 -0800 Message-Id: <20211217200418.68942-3-ffmpeg@tmm1.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217200418.68942-1-ffmpeg@tmm1.net> References: <20211217200418.68942-1-ffmpeg@tmm1.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 3/5] avutil: add obj-c helpers into header-only include 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: aman@tmm1.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Aman Karmani Reviewed-by: Ridley Combs Signed-off-by: Aman Karmani --- libavutil/objc.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 libavutil/objc.h diff --git a/libavutil/objc.h b/libavutil/objc.h new file mode 100644 index 0000000000..0db993f716 --- /dev/null +++ b/libavutil/objc.h @@ -0,0 +1,32 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_OBJC_H +#define AVUTIL_OBJC_H + +#include + +static inline void ff_objc_release(NSObject **obj) +{ + if (*obj) { + [*obj release]; + *obj = nil; + } +} + +#endif /* AVUTIL_OBJC_H */ -- 2.33.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".