mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-23 02:11:14 +08:00
avformat/rtsp: fix leading space in RTSP reason
When parsing the RTSP message reason, the whole remainder after parsing the status code was used, which would lead to a leading space in the parsed reason string.
This commit is contained in:
@@ -1274,6 +1274,7 @@ start:
|
||||
if (!strncmp(buf1, "RTSP/", 5)) {
|
||||
get_word(buf1, sizeof(buf1), &p);
|
||||
reply->status_code = atoi(buf1);
|
||||
p += strspn(p, SPACE_CHARS);
|
||||
av_strlcpy(reply->reason, p, sizeof(reply->reason));
|
||||
} else {
|
||||
av_strlcpy(reply->reason, buf1, sizeof(reply->reason)); // method
|
||||
|
||||
Reference in New Issue
Block a user