From patchwork Fri Mar 1 13:39:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Gaullier X-Patchwork-Id: 46682 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a919:b0:19e:cdac:8cce with SMTP id cd25csp1268650pzb; Fri, 1 Mar 2024 05:39:38 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVqv1K6+DTrHambwj9MEouf0f/ndNXZRAetkYLCet2OdM7NaZrerWIawRH/MWs88bpD/WJwWtef6jf3vd/C07D7dwDMKA1hOITMzQ== X-Google-Smtp-Source: AGHT+IFpZfiQbCx2QfmcbCYFJZOAeklAotzW+OA3TQ59UWzztLQYgahNYBpPAs6hb4B5eyrLRofJ X-Received: by 2002:a05:6402:ca1:b0:566:bad0:412c with SMTP id cn1-20020a0564020ca100b00566bad0412cmr1301423edb.13.1709300378394; Fri, 01 Mar 2024 05:39:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709300378; cv=none; d=google.com; s=arc-20160816; b=a48sfPaQzGlSI2zHbPbYP0B672st83tqd7m3XlfWwvHY5aRzneHnM1LMrtw4MWQWA6 rVEY7VjVmiIqZHyrRpE7vhkSbJBiTCfCi16uP+4P//xzq+ZVfiDkEAOppYcBW0KD11lJ ybz3qpSHJS8QzlxdJ5OIGQQa6QSir0Wvl8TskWQQfkrCC2TgD2WyuV8ZfZ1bmov84rDx IQOIx5yMRA931gf1ULOerMtReO82t/9q61fyjbOz5eSwEeHlDlKnuBIhAFdth/zEweFG TmTtr4awgRbTjx8l+OLZzREF4PgISnWopwEScOFxABkkeDiAjVzZG4hUHLtEtPnZZvVv vdIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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:delivered-to; bh=n2bR+YduuVKvXkL4JvPHjtCwSbw49HMdUvl+reS+IVI=; fh=zgMS+X4RExv2k7fU8QdWClnqVJdqO/9UbUuBS5xxJDs=; b=L0raIWz6mcg8LX50ZW3Xq8jXDKMiq5XYS8cd24AUu/yfkj3cbVuSYk5D1KjBR/cPM+ pfglZYaPlJkqRbuzbxiUwX+NQr7manRe5e6l+8XTdhnr37Ee/Pko9gTpgF7Hn2GCUZUI VcqTVhEub4MwKneopUQUNN4ZybKy1QqfHUs6msgHZ45WSUHlclJS34EiXPpBrk1XUS2G pK88ibu/cjEOmobNLsjSr5Tfxye3U7gSzYpKlB++R6J0MP/eutmORBVT8bo5jn9teKBA 1AQZ7QFU5ltl3wLuH0vAyP8JIT3XLr2DeMKaLYq9J6gO8lIbSj+5zTEzX1U0LTyImxfi EOZg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m10-20020a056402510a00b00565864f1abcsi1462651edd.95.2024.03.01.05.39.37; Fri, 01 Mar 2024 05:39:38 -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; 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 8F07A68D272; Fri, 1 Mar 2024 15:39:33 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from srv-infra-1.infra.inf.glb.tvvideoms.com (www.inf.tvvideoms.com [213.205.126.156]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 932E468D0AF for ; Fri, 1 Mar 2024 15:39:26 +0200 (EET) Received: from cji.paris (unknown [172.16.3.159]) by srv-infra-1.infra.inf.glb.tvvideoms.com (Postfix) with ESMTP id D8573203D4; Fri, 1 Mar 2024 13:39:25 +0000 (UTC) From: Nicolas Gaullier To: ffmpeg-devel@ffmpeg.org Date: Fri, 1 Mar 2024 14:39:20 +0100 Message-Id: <20240301133923.1132924-3-nicolas.gaullier@cji.paris> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240301133923.1132924-1-nicolas.gaullier@cji.paris> References: <20240301133923.1132924-1-nicolas.gaullier@cji.paris> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/5] avcodec/parser: reindent after previous commit 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: Nicolas Gaullier Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: BRt04B50eVcn Signed-off-by: Nicolas Gaullier --- libavcodec/parser.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 249f81d4bb..ede9e7e8b4 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -143,14 +143,14 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, buf = dummy_buf; } else if (s->cur_offset + buf_size != s->cur_frame_end[s->cur_frame_start_index]) { /* skip remainder packets */ if (pos != s->cur_frame_pos[s->cur_frame_start_index] || pos <= 0 || pts != AV_NOPTS_VALUE ) { - /* add a new packet descriptor */ - i = (s->cur_frame_start_index + 1) & (AV_PARSER_PTS_NB - 1); - s->cur_frame_start_index = i; - s->cur_frame_offset[i] = s->cur_offset; - s->cur_frame_end[i] = s->cur_offset + buf_size; - s->cur_frame_pts[i] = pts; - s->cur_frame_dts[i] = dts; - s->cur_frame_pos[i] = pos; + /* add a new packet descriptor */ + i = (s->cur_frame_start_index + 1) & (AV_PARSER_PTS_NB - 1); + s->cur_frame_start_index = i; + s->cur_frame_offset[i] = s->cur_offset; + s->cur_frame_end[i] = s->cur_offset + buf_size; + s->cur_frame_pts[i] = pts; + s->cur_frame_dts[i] = dts; + s->cur_frame_pos[i] = pos; } else { s->cur_frame_end[s->cur_frame_start_index] = s->cur_offset + buf_size; }