Message ID | 20240607130135.9088-14-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 d9csp1009708vqo; Fri, 7 Jun 2024 06:05:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWDD4b7FDxzmtk5jLMLMlkKfosMPwgKDcu8Y3TY/tZwvkwbR/ksGpwKSUyNWAJxanFKRUawe3otFOBqPmWleMlRvRzWZxZIGMjfgA== X-Google-Smtp-Source: AGHT+IETfMmlhZLkxUIbEok9XtY3wfodDQqA+ES92wbuy3fo2D695Ft3HYgitjcgqmzA71dPUaFA X-Received: by 2002:a50:8d03:0:b0:57c:563b:f37f with SMTP id 4fb4d7f45d1cf-57c563bf694mr1116493a12.19.1717765551183; Fri, 07 Jun 2024 06:05:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717765551; cv=none; d=google.com; s=arc-20160816; b=zZ0fR0ZmDAPDJdSy1YFWk6GKgj2MVeICOwShvC6Z9WBdClGI2twvEUDMdFI+HYZirz kkngPbHGgwlO3GcQVBIabL6yjts0sNsXJllzXwN1DprFWAJYCHI+B+jaKA5zlH7O5/aH yMmPt1ujxr8Mdo6ENwtuWKqwefAItnL0acLSJlGiY+w5XIC99hjKYNtAAr4gZosWCb/l n+OqrS4/4NLfOm2bf/LHBRtlswzwbm/Fuv8hPE4fBsHBsYZZ8Z7mmTUc12jgJJNKQtGr H7zItOcC1SuDjsBTmNPdJcdDAtFEbG+jY0rByC+u9CwdiLLnDdl1KgN/X3oOVidc7cmE jy9Q== 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=xQ4EUZ5lhPOR3r6tREPZdiKcva7NstX2efh1ngszy9A=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=ktfUteVv47yuVz8S+LYRYP2HjmbZVqZs32Duq1z7hk32zn0dCBKOYBMRQA3TyceGnh 4IoR/UcKXg/QJi0n2s/ogBqqMvQNuBraC73RnxnTc+DIge/a97QZJRRcwAmNJPucSqoH Ez5+YNOmKBXvbiGYwRsOxoN1Nx7lcUvPJqPnckfqkBP8ZIO6ACbWoI3Y8iQ3BkdRWeQw SrX7J1QCOo0dJi3yjUhnSO47e4W68Vt3FDyGR5YbnKYDMYbLNzZy0DJqEFvHTJ5rwNoK n9ZIwOIPf91k2QmYBdtD7fB8aMTVv/QUzLLejZEcxZp+OPRfOJgnlSLgZ3O21rD3hNYF 3SNg==; 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=Nt+JnxyD; 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 4fb4d7f45d1cf-57aae202937si1804384a12.267.2024.06.07.06.05.50; Fri, 07 Jun 2024 06:05:51 -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=Nt+JnxyD; 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 AD9D368D780; Fri, 7 Jun 2024 16:04:04 +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 6B8CB68D77C for <ffmpeg-devel@ffmpeg.org>; Fri, 7 Jun 2024 16:03:50 +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=Nt+JnxyD; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 7A1E14E02 for <ffmpeg-devel@ffmpeg.org>; Fri, 7 Jun 2024 15:03:49 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id yeWvAa1oSYea for <ffmpeg-devel@ffmpeg.org>; Fri, 7 Jun 2024 15:03:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1717765422; bh=RFp6NoS2jinXUC+/qDOxdV9rJcJkfcAAWSDDZr1oQkA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Nt+JnxyDw6d5dD32dxLff6NYhRqgePKJQM3B+VpsHL/Z7D0an0qp6SkgaGrHmRAAO 5I9td6L8o0wNk3GcnZPxi/Ke8ib/pxZEEqhfX9LMOBUFC3uZBDIXkbz6Ek1caFXwzF av5+teWFoXWSn6n5pxY5wO3uMrxMbfUjQRWnr28EkelLOVI3VOk+JH5QGTmWW5yU/G zHxBh9TAshk8HrKk3V4v8RWs3NM+DtIsJurGw9fQ7liP6MBF3AOvoM/zDaKopBIhsE 0tGuMHsarK69BTphTfYiMyusDSFlbwwm0svRdKiTQCLXGX2rUdeQvpChynmLZjpAhf KNclfHI99Ip4w== 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 062294DEE for <ffmpeg-devel@ffmpeg.org>; Fri, 7 Jun 2024 15:03:41 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id F0E6D3A0D94 for <ffmpeg-devel@ffmpeg.org>; Fri, 07 Jun 2024 15:03:34 +0200 (CEST) From: Anton Khirnov <anton@khirnov.net> To: ffmpeg-devel@ffmpeg.org Date: Fri, 7 Jun 2024 15:01:10 +0200 Message-ID: <20240607130135.9088-14-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 14/39] lavc/hevcdec: only ignore INVALIDDATA in decode_nal_unit() 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: XFPWxGMrMeKO |
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 d599373c9d..2c26d397df 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -3206,9 +3206,13 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) return 0; fail: - if (s->avctx->err_recognition & AV_EF_EXPLODE) - return ret; - return 0; + if (ret == AVERROR_INVALIDDATA && + !(s->avctx->err_recognition & AV_EF_EXPLODE)) { + av_log(s->avctx, AV_LOG_WARNING, + "Skipping invalid undecodable NALU: %d\n", s->nal_unit_type); + return 0; + } + return ret; } static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)