mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-05-01 06:13:08 +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.
(cherry picked from commit e63e040f0c)
Signed-off-by: Marvin Scholz <epirat07@gmail.com>
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