media-server icon indicating copy to clipboard operation
media-server copied to clipboard

解析rtsp崩溃

Open jiongge opened this issue 1 year ago • 1 comments

在使用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导致崩溃的,修改代码去掉后就没崩溃了

jiongge avatar Jun 17 '24 05:06 jiongge

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

ireader avatar Jun 17 '24 07:06 ireader