mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-29 02:03:03 +08:00
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:
committed by
Ryan Foster
parent
a5fa416628
commit
ef93ef6950
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user