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 C23D7421B7 for ; Thu, 16 Dec 2021 20:29:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0B76F68AF82; Thu, 16 Dec 2021 22:29:16 +0200 (EET) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2487768AF56 for ; Thu, 16 Dec 2021 22:29:09 +0200 (EET) Received: by mail-pj1-f51.google.com with SMTP id f18-20020a17090aa79200b001ad9cb23022so459978pjq.4 for ; Thu, 16 Dec 2021 12:29:09 -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=7J5gE8A6u5+d8rZTnUfnUKTgI4tI5h11RBoCpL4Ov9U=; b=ej9UzV3bmb6wA03ZyQk7PgvAHgigZxM4hHFrRP9ev87h7npcNufXxqd8r8lVuJZm/E IRGiDIlYSjuk5IdpSDaR+I7TQXlfZGeOEq8yQ3LQuayXE5pYEvejsrgpl0KnpmCrlYgi nO07vh3lwNf6Ip76F425cqSzuNX9bjZtHjXUMAXtZiK1WYo46Pi99jp22CGWrt6bUgj3 6qrtd2xhqc/tsvWZGqCoAKlEbXCoQDwc4zhs4FVw728ICLMjMre+wGGF2QblaD93WfLu 7CmbU/JVatHkmK2M9l6uJyrA4Btor6MNy6G1CnDksPKOzSYmGIyk0A2NqJ+p3WrJqgYo Rqhg== 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=7J5gE8A6u5+d8rZTnUfnUKTgI4tI5h11RBoCpL4Ov9U=; b=HRRTIHOzDp8oD/DnLY4wn6QI6HAnrpLE8cWgVVuJOOLGwl7zenGG2TVFVvXZh/zWR9 QokPCmSBXSl/FIeIIdcFiZL+Ex6UHdKF73l3qhe1thGelDRK+uGILV/e+yRIYhcc9mKY yTZwjNlGV4bBPfu8bMrcoPWbtMyXjv36u0vgFRxT4TuY96HFSQfa5QRTK9FrMv+3XymF 5XuJQKIm/+iZgtwWxAnbW8dOojwM6kKufHVWmp8iRsVc2/MPSdpC5HtMA1xu2bC1AkRM owjXEHSjy6AcjNvbyDL109LbffL9KuuRmt1IQQlchB1A5wZm1JNKIY1V5zKSr7Zv7Vzc WINA== X-Gm-Message-State: AOAM5314F5uoNE1+nJiPtSGmVjBwM3j+QBNBwvY1HSl0RVovkq2g+Tuw dEGGZHcyC0BHz+rDUUvYdR7/b50wQiHmQg== X-Google-Smtp-Source: ABdhPJxpTuoaPXY79GzmB4VOwbPfRr5YNTtXnwG/FlahY2Ao1RMOHRpjdJsGE4n9Mh0crXjIdBeJWg== X-Received: by 2002:a17:902:e892:b0:148:a77a:d312 with SMTP id w18-20020a170902e89200b00148a77ad312mr10250893plg.95.1639686547133; Thu, 16 Dec 2021 12:29:07 -0800 (PST) Received: from tmm1-imac.lan ([2600:8802:5501:308f:15c6:3324:e59b:bed5]) by smtp.gmail.com with ESMTPSA id k16sm7534732pfu.183.2021.12.16.12.29.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Dec 2021 12:29:06 -0800 (PST) From: Aman Karmani To: ffmpeg-devel@ffmpeg.org Date: Thu, 16 Dec 2021 12:28:56 -0800 Message-Id: <20211216202858.77643-3-ffmpeg@tmm1.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211216202858.77643-1-ffmpeg@tmm1.net> References: <20211216202858.77643-1-ffmpeg@tmm1.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 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: philipl@overt.org, Aman Karmani , kernrj@gmail.com 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 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..3ca1303394 --- /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 + +inline void ff_objc_release(NSObject **obj) +{ + if (*obj) { + [*obj release]; + *obj = nil; + } +} + +#endif /* AVUTIL_OBJC_H */ \ No newline at end of file -- 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".