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 538D04B041 for ; Sun, 26 May 2024 23:53:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DC5AE68D5B4; Mon, 27 May 2024 02:52:48 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5868A68D542 for ; Mon, 27 May 2024 02:52:42 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 8C5E720004 for ; Sun, 26 May 2024 23:52:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716767561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7ZK32Gw31Yjt8tf8k8l4uegmqHnX32xHC9wbx7xKzFY=; b=Ey7uKPVcSEAFHbsyJUU0ZLTUy4GnAerotAlKEomfwzvgJpcnhK0mjvb2WSIqJgpRj1dcp0 OFYZ9IwhKaGYrLWXyb9ZnRZ9GYA5Ewn+lVNf2sIkezp/9e5E7cPLSSFUwOjP74JRhLYyQt BIJY2Mi/xdgcmI/jwwhnnI+hLxJNNn/cEe5LokfCh5THUEEprv3Qk6X7b6VVe0iBnnLozg 8B003gegWTSxxEN6nlhn8NlgDBqUEcsfadSOdu+fONa6MqXBGF5CdUTl4Xj1RSEf7wP/MO phxjMlSxxo0OHOM/Nku19EINahzFIhTbNA2vf7gWEDrd6IqQkFXSldvFUdfd8w== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 27 May 2024 01:52:24 +0200 Message-ID: <20240526235230.2876318-12-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240526235230.2876318-1-michael@niedermayer.cc> References: <20240526235230.2876318-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 12/17] avdevice/dshow: Check device_filter_unique_name before use 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Fixes: CID1591931 Explicit null dereferenced Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavdevice/dshow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index fd9027b1787..911b0ecc078 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -1373,7 +1373,7 @@ dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum, if (ctx->device_filter[otherDevType]) { // avoid adding add two instances of the same device to the graph, one for video, one for audio // a few devices don't support this (could also do this check earlier to avoid double crossbars, etc. but they seem OK) - if (strcmp(device_filter_unique_name, ctx->device_unique_name[otherDevType]) == 0) { + if (!device_filter_unique_name || strcmp(device_filter_unique_name, ctx->device_unique_name[otherDevType]) == 0) { av_log(avctx, AV_LOG_DEBUG, "reusing previous graph capture filter... %s\n", device_filter_unique_name); IBaseFilter_Release(device_filter); device_filter = ctx->device_filter[otherDevType]; -- 2.45.1 _______________________________________________ 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".