ireader / media-server

RTSP/RTP/RTMP/FLV/HLS/MPEG-TS/MPEG-PS/MPEG-DASH/MP4/fMP4/MKV/WebM
MIT License
2.98k stars 1.06k forks source link

解析rtsp崩溃 #341

Open jiongge opened 2 weeks ago

jiongge commented 2 weeks ago

在使用rtsp_client_test2来测试rtsp的时候,连接的是SVAC智能摄像机 sir50

运行命令 ./test -c rtsp_client_test2 rtsp://192.168.1.222:554 admin admin123 打印输出: run rtsp_client_test2 test: source/http-parser.c:665: http_parse_header_line: Assertion `0' failed. Aborted

后来我修改rtsp-client.c把rtsp_client_input传入的数据打印出来: run rtsp_client_test2 (jg1)RTSP/1.0 401 Unauthorized CSeq: 1 Thu, Jun 13 2024 04:00:59 GMT WWW-Authenticate: Digest realm="Keda Streaming Media", nonce="d8cbba9c5f2f39b15298fe9228b7bca0"

test: source/http-parser.c:665: http_parse_header_line: Assertion `0' failed. Aborted

应该是这句话Thu, Jun 13 2024 04:00:59 GMT导致崩溃的,修改代码去掉后就没崩溃了

ireader commented 2 weeks ago
CSeq: 1
Thu, Jun 13 2024 04:00:59 GMT
WWW-Authenticate: Digest realm="Keda Streaming Media", nonce="d8cbba9c5f2f39b15298fe9228b7bca0"

Thu, Jun 13 2024 04:00:59 GMT 前面差个date header,正确形式应该是: Date: Thu, Jun 13 2024 04:00:59 GMT