From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 348E643DFC for ; Wed, 14 Sep 2022 12:58:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F1E5368BAF3; Wed, 14 Sep 2022 15:58:43 +0300 (EEST) Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 900EA68B779 for ; Wed, 14 Sep 2022 15:58:37 +0300 (EEST) Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-12803ac8113so40654019fac.8 for ; Wed, 14 Sep 2022 05:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date; bh=mnsJmJk9TCsRGmB5n5PiyLMsQOr4tQlT99DBF6RTWHM=; b=DkIIKVtBeoW8boVfb7GPP9NQurskCclhKQpyuBdUQRxXqzE59n3zVgYsmqAIe1lEsW 4fMEVwO9hbUxASC74wRAdGOYT/kmACVRe+2wzgDO4oylIKzgDVCbztYFyxL/PQQeXlSg 7SsisIU4AhIJglXOE/fm4nGT0J3exvNXqdFJk1B1jVEkjodoKL7ub0f0S+mqCO18prf4 rPEO5JHh57LR8l+u1Q9qhb9HlaSy/lC1SBTY/74AtYJoIeMIG7DsleeZ4xOUnJpmDA9r OEXoaI+A2/VrVheVCFqCYLlxA33RQxySvw+Oi8Q5+Vx/q4udreYzlPeQm2XllZVqfFVH PTSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=mnsJmJk9TCsRGmB5n5PiyLMsQOr4tQlT99DBF6RTWHM=; b=0Wb0Qwk6cmRcqMAhuClvWsdbq4R6yfTnSOzOYA/Buf6hVo+qsQMhDLVFgV7DPyZuw+ f3KcwZmiE1xsvQoauOAheoq0ZTfo+0vYOAaBXftbcmDeCrZgv+Y2cDMW1uwhn6tYwk3e bhoURarKAVrngOltceLRT8TLbWU8VISj9hdqL0xr8i/w/MYcAc4VTMNYu4s8n89ImOmW Py8AaOlec5/TqPIlaYcaSfYs+p9UfUwi/jFYyTVHRjHx28SfO8QAsXvj359kj4A9jne/ jCBo9eAgPUKxMTVmq/+mc7mzJW5PLwRKAWWf4qpPCFQEGw2XqV6qe8dD2bfG6lrIaIMM VnvA== X-Gm-Message-State: ACgBeo2HvReb8ssmnHhzGQ7rlijdBguTxCfOT27UJ/jfyGSFqQTdQ49A v+TAGZE9AwAkgxCLhudml3qddU11ezQ= X-Google-Smtp-Source: AA6agR7tWWqWtrbe10T/GjeQavnRE4niYkcenFUSxo8ifAlMvZ82P0I6YFruRCZyt4pfj10pm+yhHg== X-Received: by 2002:a05:6870:58a1:b0:118:8649:ab9e with SMTP id be33-20020a05687058a100b001188649ab9emr2110002oab.5.1663160315955; Wed, 14 Sep 2022 05:58:35 -0700 (PDT) Received: from [192.168.0.13] ([191.97.187.183]) by smtp.gmail.com with ESMTPSA id v27-20020a056870311b00b0012c21a64a76sm587602oaa.24.2022.09.14.05.58.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Sep 2022 05:58:35 -0700 (PDT) Message-ID: Date: Wed, 14 Sep 2022 09:58:34 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 From: James Almer To: ffmpeg-devel@ffmpeg.org References: <20220912130208.2222-1-jamrial@gmail.com> Content-Language: en-US In-Reply-To: <20220912130208.2222-1-jamrial@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH] fftools/opt_common: check the return value of av_hwdevice_get_type_name before printing it 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 9/12/2022 10:02 AM, James Almer wrote: > It may be NULL, as is the case for D3D11VA_VLD. > > Running "ffmpeg -h decoder=h264" on a Windows build > > Before: > Decoder h264 [H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]: > Supported hardware devices: dxva2 (null) d3d11va cuda > > After: > Decoder h264 [H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]: > Supported hardware devices: dxva2 d3d11va cuda > > Signed-off-by: James Almer > --- > fftools/opt_common.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/fftools/opt_common.c b/fftools/opt_common.c > index 7cd8b1c66e..8a06df82df 100644 > --- a/fftools/opt_common.c > +++ b/fftools/opt_common.c > @@ -335,9 +335,12 @@ static void print_codec(const AVCodec *c) > printf(" Supported hardware devices: "); > for (int i = 0;; i++) { > const AVCodecHWConfig *config = avcodec_get_hw_config(c, i); > + const char *name; > if (!config) > break; > - printf("%s ", av_hwdevice_get_type_name(config->device_type)); > + name = av_hwdevice_get_type_name(config->device_type); > + if (name) > + printf("%s ", name); > } > printf("\n"); > } Applied. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".