From c94e4dc1362b9ac03cddb9def913ea6728875fe2 Mon Sep 17 00:00:00 2001
From: Mladen Milinkovic <maxrd2@smoothware.net>
Date: Sun, 18 Sep 2022 23:09:17 +0200
Subject: [PATCH] Fixed possible null pointer deref

---
 src/videoplayer/backend/streamdemuxer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/videoplayer/backend/streamdemuxer.cpp b/src/videoplayer/backend/streamdemuxer.cpp
index d15cf9f4..4ae4171d 100644
--- a/src/videoplayer/backend/streamdemuxer.cpp
+++ b/src/videoplayer/backend/streamdemuxer.cpp
@@ -45,7 +45,7 @@ isRealTime(AVFormatContext *s)
 #else
 	const char *url = s->url;
 #endif
-	if(s->pb && (!strncmp(url, "rtp:", 4) || !strncmp(url, "udp:", 4)))
+	if(s->pb && url && (!strncmp(url, "rtp:", 4) || !strncmp(url, "udp:", 4)))
 		return 1;
 	return 0;
 }
-- 
GitLab

