Closed winlinvip closed 9 months ago
Examine the pcap file, where FFmpeg sends AMF0 data, but it doesn't begin with the AMF0 string:
Packet #72:
04 00 00 64 00 00 04 12 01 00 00 00
Packet #74:
00 01 a5 e0
(lldb) p *msg
(SrsCommonMessage) $0 = {
header = {
timestamp_delta = 100
payload_length = 4
message_type = '\x12' 18 '\x12'
stream_id = 1
timestamp = 100
perfer_cid = 4
}
size = 4
payload = 0x0000602000003570 ""
}
(lldb) x/4xb msg->payload
0x602000003570: 0x00 0x01 0xa5 0xe0
SRS should be able to handle this message by simply ignoring it:
[2023-09-18 11:38:45.099][WARN][91322][148t53jz][35] Ignore FFmpeg timecode, data=[00 01 a5 e0]
See Error submitting a packet to the muxer: Broken pipe, Error muxing a packet
Test using the file timecode.mp4.zip or below:
https://github.com/ossrs/srs/assets/2777660/d50947a7-996a-4364-9593-3fb559b8e740
Use this FFmpeg command:
SRS will fail with this error:
Here's the pcap file:
rtmp-amf0-invalid.pcapng.zip