From patchwork Mon Sep 26 09:38:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyaqiang <1035567130@qq.com> X-Patchwork-Id: 38330 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp2131971pzh; Mon, 26 Sep 2022 02:38:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6wSP+jeXhW8Lp+JMACj9sbftaFUIrwlBjVV51bIX5OOpW1+69Puk79TWj88zoSanpxQ0VD X-Received: by 2002:a17:906:8457:b0:779:9f0a:fb with SMTP id e23-20020a170906845700b007799f0a00fbmr17939200ejy.665.1664185121349; Mon, 26 Sep 2022 02:38:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664185121; cv=none; d=google.com; s=arc-20160816; b=oeUlqPstSvcg7UEUV5y9T6flI8x8JLjMTxeA6P+yPh/8oD5FdLyf1sxsJM+WP0BQO1 fdG8Q1fLMhtW9joLFpDfQos041uJGJN2RfMk51C6wXeTvlRFV+n8qIEJHTcoHMUyjvKO g+m9f8UzsTNbnFhxf/04F7WAqOkQzOAHjU8m6x15Il66b4+mfly8zKsbIC6uHE5hEwCg F8tc5sciIh7zBX/PHtfhFFKBoDCtDsW5JP2KDKflo5Y7Hm+K+jsibquqTgcOx+Lt2k6H V4s1Flt3YCXxy4VjyVI73iSYgw2Eo1bIcNy7pr2X3WPTJMGP5tfEQ4Zn52Jdp6e3GXFL wERQ== 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:date :to:from:message-id:dkim-signature:delivered-to; bh=1CIHwGW+YK4h7sjnlBYRMafmwp/nwk7MG3pDY3ln1U0=; b=aX94Iw3/EzQGdr9WHhz5df3fIswbOB03JcdrkWGFtuKdeIQkVciMWWzyEkRQqy27rw zjAx2nwEowqLgWLiSY36fmAEYrjmXPsBUEIvPB0+/iJi0Xi8UdmntD7lbehYgUQ/hJYS xvkYHSitn6M5CsF6+vSSJiu35obrvoD7Uqr2eUwe0A4sixlYQVfrhHfEpRj9pEnD/71V /NvKSePJI7OA3uXdzyVV3lBiIyxdldg4Yc7kihLtMyRAW7l2trrWlk4Yv0rGKWBPAyZa MJB8odLQpCLxxOvxJT2ljRA9VFG/lfiLRxCodATSxbVLUgz4Or4odWq5zlI3ivlsbPRJ UDDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@qq.com header.s=s201512 header.b=OhVN3b6+; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=qq.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ds3-20020a170907724300b0073dbc331a40si3909835ejc.188.2022.09.26.02.38.39; Mon, 26 Sep 2022 02:38:41 -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=@qq.com header.s=s201512 header.b=OhVN3b6+; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=qq.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F406768B745; Mon, 26 Sep 2022 12:38:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out203-205-251-53.mail.qq.com (out203-205-251-53.mail.qq.com [203.205.251.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D4C7F68B1B3 for ; Mon, 26 Sep 2022 12:38:28 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1664185098; bh=Bw7Qhna6EvB7YiiDrHxjBSVWt5POGINrp7iaWXhs3W8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OhVN3b6+b5Dh0iLYHwonna6i9bwXx70xjerHz/nU2jh9KjcB5xLHChvUUalXlOolG cDukdStf8U7rA2kEuUuTuCMItTSiwxiBGp+cIadzo+W5w45jFOP/i4+TdxEIArlecJ FvxWTKaO45uIhtmLjWyFtNDyp6gcoSOv5XiQ+GU4= Received: from localhost.localdomain ([103.107.216.237]) by newxmesmtplogicsvrsza5.qq.com (NewEsmtp) with SMTP id 990994DD; Mon, 26 Sep 2022 17:38:16 +0800 X-QQ-mid: xmsmtpt1664185096tikz9y4uv Message-ID: X-QQ-XMAILINFO: N+a2Jt890Iyn5M/hOb82izVT9omXze5bQaATSAzk04aBELWOlM+9hmeBkL4Mmx n5WPqTgVW+3z+ABqZCPDpHN1XQ/EpUaJYByQLTxebyWRQE+Q7OsiipU5//aT1Bimi/4zBwbmzTg7 QJHE35uhB170IJ3qLW/Wg2C7xCDA/xunVyY9QNuIdu+tX/vmxT60HVTORoRXY1PFakWViYxlktdS uJ1cEo5toeaYduaXJLYTGIUtwMbe6e/CBLKzHQ3POM/QFXCWBfp3zFF43kZDHL9NE+Vlr/A8y1Jw k8SO0nWIGuTs9tJYVf8PopUpOQ+lOspgCPpmbdwJjKV4COnW/EW3q5OQlv8/dkNhOCdI8SG3WTil iYyJvLnTHtqJmZp1ddzRlksvSFUfUSyQgrYSJab0Xvd6O0OJaDf5XvTqIjF+89/tMEQVUQhkRG1l WNnk6QutrO0U0j6SZ6cVxmTWFOn4IBIc8TKeWSaInM/ADfwRymxjsU3zQdKon2s3V1DyVPOVwKj3 6a5jm1laqNJf5GiRd2TPPjcnpqOROY3QJ0UpxWOTs9TN9jCAB3o+27YR54LK8jAhwLbFMqPAAhHy QAN80m+jXyWIWPEqF0rQLPJCaMSuZcf24mW0L1BOAelnTAQIHMVhq/3cKIsjVpJleTFhiM3vU3Yb 7tTQNgQwZELnswi9yaXB2LcapSgV1Njqeb76yUEW7y8gLKKD0VY+wFnm+bHshbYaD3xrLaHuzx70 IloNm7VE+DloDEKHdcGAaDwiJ4DqJ7sri2Tz7g97rAhC8GghYekoHYIPB1loV8OnDqG5Qc7Tf0RK C14SwuXjYI8w4g+ixZcHMmSknlDDHCRWG+C/8ZAA5UA2KaR/sfq8FMx5eHwtUyPT5HLslj+QFcIv Q1VzVt0kGr3oFmhqyNmjFcWPX0rz7C41cwgsy7Z/IHdTZBba89CDA= From: 1035567130@qq.com To: ffmpeg-devel@ffmpeg.org Date: Mon, 26 Sep 2022 17:38:14 +0800 X-OQ-MSGID: <20220926093814.50950-1-1035567130@qq.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2] lavc/hevc_ps: fix process failed when SPS before VPS in hvcC 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: Wang Yaqiang Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Ee9Q/daf8z4L From: Wang Yaqiang In some videos, SPS will be stored before VPS in hvcC box, parse SPS does not depend on VPS, so the video is expected to be processed normally. Added "parsed_vps" parameter to indicate whether VPS have been parsed. Only VPS have been parsed can be verified during SPS parsing. Signed-off-by: Wang Yaqiang --- libavcodec/hevc_ps.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index f665d8053c..9abee8bd90 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -916,9 +916,8 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->vps_id = get_bits(gb, 4); if (vps_list && !vps_list[sps->vps_id]) { - av_log(avctx, AV_LOG_ERROR, "VPS %d does not exist\n", + av_log(avctx, AV_LOG_WARNING, "VPS %d does not exist\n", sps->vps_id); - return AVERROR_INVALIDDATA; } sps->max_sub_layers = get_bits(gb, 3) + 1;