obs-ffmpeg: Null-check url query parameters

Fixes a crash if someone streams to a URL that does not have any query
parameters.

Amends 55c4ca9e63.
This commit is contained in:
Sebastian Beckmann
2025-08-30 13:12:43 +02:00
committed by Ryan Foster
parent a5fa416628
commit ef93ef6950
+2 -2
View File
@@ -863,8 +863,8 @@ static bool fetch_service_info(struct ffmpeg_output *stream, struct ffmpeg_cfg *
const char *p;
char buf[1024];
p = strchr(config->url, '?');
if (av_find_info_tag(buf, sizeof(buf), "payload_size", p) ||
av_find_info_tag(buf, sizeof(buf), "pkt_size", p)) {
if (p && (av_find_info_tag(buf, sizeof(buf), "payload_size", p) ||
av_find_info_tag(buf, sizeof(buf), "pkt_size", p))) {
config->srt_pkt_size = strtol(buf, NULL, 10);
}
return true;