From patchwork Thu Jan 5 11:07:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 39882 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bc95:b0:ad:ade2:bfd2 with SMTP id fx21csp297253pzb; Thu, 5 Jan 2023 03:08:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXuSXt7jLLAqZPeMxUTvfZynHJL0sQ9vGs8QZityMghJ/i+gtu+Sg7TcFMF0taGM04bf1Wa6 X-Received: by 2002:a05:6402:ea0:b0:46f:68d0:76 with SMTP id h32-20020a0564020ea000b0046f68d00076mr35652674eda.34.1672916892751; Thu, 05 Jan 2023 03:08:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672916892; cv=none; d=google.com; s=arc-20160816; b=d1ZGYAUtX0hpE0u+54abiZLc81zeYQI137sWSqGUhOwWmH21VtyTLuUjVJsph01WoK z0ht29iHdPYBsIgePOnJ5Jkcp78Pm6jPoW/kv7S3x41a33I2g2rsxvA9IHwsuYM1Ws9b CjRiyXs4gLbWYJdmZjlYhKJsffDA0/PDFTZyIJK9YBoSiIhDJdiSGv2A5FxbxiRjjyI5 9ZPN3YNyM8+J53GD5INSC2iiO0V1nW4FFqTJZVR+d2PnD/F29md8rDhT4aUWmY4oaS8b resMKW1NCfxL500okrsaXPsofw/8PxwtH1fGIkuHiBKWNSpp9P+531QNvU7MX7RWK4pI jv/Q== 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:delivered-to; bh=jAw1TXhuHlTWlJjGQd2TGlVDyRbtt0ESkKUBSSWI9Fc=; b=QGtV2Rfa8VMo9shhJC308Y1teeJLLiaZ7fz/sw+OWXHeWd78qJBEVBaGcWa4zWisaN qHFSi7beCS8Y/QHb8oz0dqNKMbuvmnyjMvHe9ofmAtYkJW30u0PHb2WnRucHFQHWe4iN /smbhJ+wqogHHSbpHQdDbaUXtbvE3kEfcruo3ZnVMXMlRe+S5a692gC90+1PBa3I2n0a 2v9MkIchE/DP7oZmLrXR6CTdTRmdfaEpEmSJBXkQIet8uVe64IrhTxfcfXQ5k5eCCQwN Tugu4QzBY8N/NryzzNv3E5l14udI70R8CHd1G8hpCxq1yYqnMZ5yVfmbWZHQcIUkSmzV V/8g== 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 ds15-20020a0564021ccf00b00492c006b79asi1357844edb.434.2023.01.05.03.08.10; Thu, 05 Jan 2023 03:08:12 -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 937B568BCBB; Thu, 5 Jan 2023 13:08:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8C21C68BC58 for ; Thu, 5 Jan 2023 13:07:59 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 4C0A9240591 for ; Thu, 5 Jan 2023 12:07:59 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id A-7G2BTn_Gsp for ; Thu, 5 Jan 2023 12:07:58 +0100 (CET) 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 mail0.khirnov.net (Postfix) with ESMTPS id C8EB3240499 for ; Thu, 5 Jan 2023 12:07:58 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 92C543A0344 for ; Thu, 5 Jan 2023 12:07:58 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 5 Jan 2023 12:07:54 +0100 Message-Id: <20230105110756.473-2-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230105110756.473-1-anton@khirnov.net> References: <20230105110756.473-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/4] lavc/qsvdec: check ff_decode_frame_props() return value 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: S0UoZGY54+CD --- libavcodec/qsvdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 92bfea196e..6bc85116ad 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -128,7 +128,9 @@ static int qsv_get_continuous_buffer(AVCodecContext *avctx, AVFrame *frame, { int ret = 0; - ff_decode_frame_props(avctx, frame); + ret = ff_decode_frame_props(avctx, frame); + if (ret < 0) + return ret; frame->width = avctx->width; frame->height = avctx->height;