From patchwork Wed Mar 10 01:05:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26295 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id CF50944ACEC for ; Wed, 10 Mar 2021 03:13:26 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B1D7768A89C; Wed, 10 Mar 2021 03:13:26 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9D41868A846 for ; Wed, 10 Mar 2021 03:13:20 +0200 (EET) Received: by mail-lj1-f178.google.com with SMTP id m11so23281043lji.10 for ; Tue, 09 Mar 2021 17:13:20 -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:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=MFQQG5l0hHv8sMIeUuInODJ6XdS4JPxSHSkM8IqL2PI=; b=hcGgpkh5xTDU6vY3r1Q79RH0KAD3G5WdI7LlSu91LqlwoBDBG1myOpugiek1fYAqX+ 0iWpiqOr6OTpeRDxTilK82PQJYVwETpsFJ50t7Kdc3/mzODNMLkMFF/1f2MZ8O6Ritxs UnLHYYKM4nzgLA+jIall7Im9zBVUicl+u2bU81vcLS+7Qch7PU5hwHKow3HWwYQtR9NW h7UkrARjvfJZFNbifdjhiMahj88saQY2bfaj31dZ/gtlaO1abWZjv7QBvDkznK7bGTss tzLLJWfx7f5reBDakb2AQDgOBCpsQxEO8LPdeum42JyWfSBU+9g5G+JFbXaADT+/8oRL eyIA== 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:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=MFQQG5l0hHv8sMIeUuInODJ6XdS4JPxSHSkM8IqL2PI=; b=GuqTYbmxqro+AkyIRYiLYoxzH/nWR0ET0IZXeQLE+3jfmCTpPCAnOnzp8rs/Tz8VJ6 bG3J1bzcxOkVsct2SN+Z6Mey3upxjhAnD8GKI4QQMgZJ+CbcgkfhBgNSa6oLrVYpYeWs MhUmxEwVY/GxpXwZCtxcRzh+Z2Kyohj2WIJ+QjSOkZGYp6tpNsZ3bchbPt2Y9ukggJQE 8/RwvFRjxmcLiMm3Ae52I4iYcLns0I217rFVKw3s/HJKpqQTMOEus5PUm3W9a8PAUX7G WiOWjRNjex9xBd+cPCNsut/4YRD86xyChcJiZr82v1uTfN7Q4DAihCMzBJoWE4Nn02lm 1x9Q== X-Gm-Message-State: AOAM533sR9B30PNCPN70MNXTN/viIozE+VlQDRECwtA5Qf5c4WVyyn6Q GOtnq71BgK1nqjZN0N6lArET61rSvlI= X-Google-Smtp-Source: ABdhPJyBNYmgCTU0IHwkAtPhz3nNB3zREsc/6hM5DpXVf3IXu//X8wyjJukyCn1q3fc19OrN9caW6w== X-Received: by 2002:a17:907:75c2:: with SMTP id jl2mr849334ejc.334.1615338396332; Tue, 09 Mar 2021 17:06:36 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id r13sm9960737edy.3.2021.03.09.17.06.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 17:06:36 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 10 Mar 2021 02:05:59 +0100 Message-Id: <20210310010601.1142819-6-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210310010601.1142819-1-andreas.rheinhardt@gmail.com> References: <20210310010601.1142819-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/8] avcodec/cbs_sei: Don't use -1th element of array 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" (This affected only suffix SEI messages; yet no such SEI messages are currently inserted.) Signed-off-by: Andreas Rheinhardt --- libavcodec/cbs_sei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cbs_sei.c b/libavcodec/cbs_sei.c index c49830ad77..2a96db9674 100644 --- a/libavcodec/cbs_sei.c +++ b/libavcodec/cbs_sei.c @@ -166,7 +166,7 @@ static int cbs_sei_get_unit(CodedBitstreamContext *ctx, } if (i < 0) { // No VCL units; just put it at the end. - position = -1; + position = au->nb_units; } else { position = i + 1; }