From patchwork Mon Feb 6 16:14:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Bouron X-Patchwork-Id: 2435 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp1847916vsb; Mon, 6 Feb 2017 08:21:00 -0800 (PST) X-Received: by 10.28.158.74 with SMTP id h71mr10091492wme.59.1486398060517; Mon, 06 Feb 2017 08:21:00 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j131si8645411wmg.63.2017.02.06.08.20.59; Mon, 06 Feb 2017 08:21:00 -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=@gmail.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6B1B7689B6C; Mon, 6 Feb 2017 18:20:54 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5C232689AE5 for ; Mon, 6 Feb 2017 18:20:47 +0200 (EET) Received: by mail-wm0-f67.google.com with SMTP id u63so22823537wmu.2 for ; Mon, 06 Feb 2017 08:20:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=/gltJciNHNjoNVYp0wPTRm0Oj5uT4muJWkSMepi/e10=; b=W4XsuasIzWE+jUxEIHJ1naAcbWsXcJVwDWsWXhONEriIxjxeLalPdrgZ5pwUGBmT3W M63wZPPSThXgfvNnlN41wOYWS4gkHg5TyATKNHsoU22KPpqVRSM12Fm1wbuWhFAXLg2u mjVxCHw7vHk6MKtUMnVf0beZ1aPNfQEQO+bjIa+ly63YNIejtZZYSe47qQ5cuavK5wH1 BhOlQ9aZ1tlxVdclpxGt5fSju9iPUb0Mq4zuUymHPCvxfBhoK5HfYoSlqU5hHG+F1Xsp YuIQ2XW3eArgN0GTQQ+QvSVetgxXyVyZI+zWlojlW5HzP65VyTfLqYyXV3zdF5RLH0LF Fe5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/gltJciNHNjoNVYp0wPTRm0Oj5uT4muJWkSMepi/e10=; b=SkyddMktpxnHCiQok1W8AQ8Ass7wu7puv5+h83NNyGmbf8Z9t20c7R7oIc3gNVcwhk HIEV8QUN2P3qN/eyyxE4iYrV4fkCLqFFiaWZe7vTg389t7mX2Rqh3yT79uOu501OEfiK gF/k7UzqxPwZuFsXBTeX1lwyA9EOBLi1BmCNZ+s0X4+blhHw679jZAWk4LC2KkMBUq5I GvbdJnfrlHs2pTiw0TMHo5rlgdI+Ga7XEBkEkct5AkTNEKTxAcMJXDQlVi+UYiledqgi 9MO4mXDt1/92NS2tGOXS7FgiVECzTzTTrMphVRfbV8zF57yB3nCqVF+yvXB4LE8/EVxm VW2w== X-Gm-Message-State: AMke39k0XyzTrqEdTSt6HKxNFlx6kaWYYAj0aJ5eRDOnZHvRP/bUFTyRfPX6JN2RhYhclA== X-Received: by 10.28.206.199 with SMTP id e190mr9624748wmg.98.1486397705188; Mon, 06 Feb 2017 08:15:05 -0800 (PST) Received: from localhost.localdomain (AMontsouris-653-1-316-105.w90-44.abo.wanadoo.fr. [90.44.151.105]) by smtp.gmail.com with ESMTPSA id k4sm13652075wmf.22.2017.02.06.08.15.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Feb 2017 08:15:04 -0800 (PST) From: Matthieu Bouron To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 Feb 2017 17:14:57 +0100 Message-Id: <20170206161457.5556-1-matthieu.bouron@gmail.com> X-Mailer: git-send-email 2.11.1 Subject: [FFmpeg-devel] [PATCH] lavc/h264dec: use OFFSET macro X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Matthieu Bouron MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavcodec/h264dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 41c0964392..da34be81cc 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -1072,8 +1072,8 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data, #define OFFSET(x) offsetof(H264Context, x) #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM static const AVOption h264_options[] = { - {"is_avc", "is avc", offsetof(H264Context, is_avc), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, 0}, - {"nal_length_size", "nal_length_size", offsetof(H264Context, nal_length_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, 0}, + { "is_avc", "is avc", OFFSET(is_avc), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, 0 }, + { "nal_length_size", "nal_length_size", OFFSET(nal_length_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, 0 }, { "enable_er", "Enable error resilience on damaged frames (unsafe)", OFFSET(enable_er), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD }, { NULL }, };