Message ID | 20240607130135.9088-25-anton@khirnov.net |
---|---|
State | New |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c209:0:b0:460:55fa:d5ed with SMTP id d9csp1011359vqo; Fri, 7 Jun 2024 06:08:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW/piUe0AhodpYkoOfvm9bSo90sJRhozOyz9oIP1lWHF6zfqcbuLa/uHS2no65yEFKMP7TGr2uC3mXANpC7g/ipYRgT252sp7JbiA== X-Google-Smtp-Source: AGHT+IF0TcenPX2xjS5+coc2vVnmAOGQ41kPvJDkLGbKzr4z7udoZwzsb4s/+9EkGakB+rN18cK0 X-Received: by 2002:a05:6512:3d06:b0:518:dae6:d0ec with SMTP id 2adb3069b0e04-52bb9f5ba2emr2795362e87.4.1717765686400; Fri, 07 Jun 2024 06:08:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717765686; cv=none; d=google.com; s=arc-20160816; b=xComIUHd1uUr2BdGMIQMu3hqn1QzIdixO6ctHxiSDWXwdehP//0wNydryHYGGseKe8 cIC7GCLCv/V7Vqqm3z/NkIN4zwAOpOoT31YAdDl0b4KVl2oNC4GKmDHM3+PPeIsIaPiP uNlXqHGKbWpKwIbsyb6rwnOiaXLdQ+m5wRKD+ohlgnJ610uVwdgQwngvS8PW5TR5XZN8 egkUj5dn/W4Hb/vgl9GBsjLeNb9KBW+KxrYHRunGWk3QCeL6gqgM+s2BYWFQXtR847wg /LIAj4oPic4dnzyuIt3hICi8yfnwXj6dWDEOSjVOvBNRFYEHb6skCZ+vlWccN9p2qyj3 yTVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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:dkim-signature:delivered-to; bh=ev3C6falqK2ZQQue2ZocyD77jgkeY95I++M9MkDXKRw=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=iHBAzXyDAWL8jUj+EmOScfkt7wOSKByF+l4vLNBwbkccwC7ScSoDoJEzP0Seg7986O sLQr1N5mDZrlIxwoM0cKGf6ygjlrw3GE++RIFnZbM/9ahLcy4PrTyx2ttjtFMD5vC3OZ Z1wLBs8hHiVydMwPJ3ByXeVh50pHowaJsDueaLa7NCidWiQLA9XqhGL6R6TPhkSNEt3i ubxEKshe+GKBY4RtYR1O1qeceDczBg+lVGG9XZQW4wI6YTrkhAWVc5avnq5aErboh+Dg 1Q6sTuDKRoaMsWN+eNVPPN02+2SKnRBk8SRWI7tY6FGTb4JfxRU31+Q+VYsFdgTlvI9w qmmQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=dzDTnnLW; 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: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-52bc244c388si159386e87.440.2024.06.07.06.08.06; Fri, 07 Jun 2024 06:08:06 -0700 (PDT) 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=@khirnov.net header.s=mail header.b=dzDTnnLW; 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 C67DB68D834; Fri, 7 Jun 2024 16:04:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2FAFA68D763 for <ffmpeg-devel@ffmpeg.org>; Fri, 7 Jun 2024 16:03:51 +0300 (EEST) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=dzDTnnLW; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id E5CDF4D42 for <ffmpeg-devel@ffmpeg.org>; Fri, 7 Jun 2024 15:03:50 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id T_FmAVUdbqDW for <ffmpeg-devel@ffmpeg.org>; Fri, 7 Jun 2024 15:03:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1717765422; bh=NAWiIs/3pvujQXjxuXfhm8AYxyuc1zoSq5HRPwfs114=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dzDTnnLWRAFqp88Bjb59GNXjZhPwlcDPj78UjtFH/eRSZgibL9pOVbbu70V2qS5w9 vyDtcGPzq2hQoKDjuF87PCVV8yN68JedHRpNU62NieiRoAM4YdJXR25UyRoVK2qAWM KPcBXm2aCakCABjz+HUUHF/vfK6xo1EA2wa6XghLdykDXgqujT8WAFq1WSdgBetOV8 2owfFdl7Ps5iRy+T6DdE+f1i5STB0usbeDBLGyZDVU+v/RUlUzXjpeVm7wnyllsZS1 YnWmoQEEghBhUcIYf5ELKFlB0xBO0xsjBvBqn5X1GhYW+w4Ai/V1Ymdp22IRD6hEz6 QEx4TM7J2OtpQ== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 9075D4E0A for <ffmpeg-devel@ffmpeg.org>; Fri, 7 Jun 2024 15:03:42 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 7D3E03A1951 for <ffmpeg-devel@ffmpeg.org>; Fri, 07 Jun 2024 15:03:35 +0200 (CEST) From: Anton Khirnov <anton@khirnov.net> To: ffmpeg-devel@ffmpeg.org Date: Fri, 7 Jun 2024 15:01:21 +0200 Message-ID: <20240607130135.9088-25-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240607130135.9088-1-anton@khirnov.net> References: <20240607130135.9088-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 25/39] lavc/hevcdec: move a slice segment sanity check to hls_slice_header() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: NBKwLj4IzobB |
Series |
[FFmpeg-devel,01/39] lavc/hevcdec: do not free SliceHeader arrays in pic_arrays_free()
|
expand
|
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index df6d1565bc..9c1d879953 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -1002,7 +1002,8 @@ static int hls_slice_header(HEVCContext *s, GetBitContext *gb) sh->slice_ctb_addr_rs = sh->slice_segment_addr; - if (!s->sh.slice_ctb_addr_rs && s->sh.dependent_slice_segment_flag) { + if (sh->dependent_slice_segment_flag && + (!sh->slice_ctb_addr_rs || !pps->ctb_addr_rs_to_ts[sh->slice_ctb_addr_rs])) { av_log(s->avctx, AV_LOG_ERROR, "Impossible slice segment.\n"); return AVERROR_INVALIDDATA; } @@ -2577,11 +2578,6 @@ static int hls_decode_entry(HEVCContext *s, GetBitContext *gb) int ctb_addr_ts = pps->ctb_addr_rs_to_ts[s->sh.slice_ctb_addr_rs]; int ret; - if (!ctb_addr_ts && s->sh.dependent_slice_segment_flag) { - av_log(s->avctx, AV_LOG_ERROR, "Impossible initial tile.\n"); - return AVERROR_INVALIDDATA; - } - if (s->sh.dependent_slice_segment_flag) { int prev_rs = pps->ctb_addr_ts_to_rs[ctb_addr_ts - 1]; if (s->tab_slice_address[prev_rs] != s->sh.slice_addr) {