Closed 5centscdn closed 10 months ago
We have tested with SRS 5.0.170 too. SRS is crashing when we encode to srs media server with invalid codec. Only issue is with Dash. When we disable Dash and enable HLS only then it's working without any issue.
ffmpeg -i rtmp://51.210.214.151/arena1/main -c copy -f flv rtmp://206.75.162.204/live/test Input #0, flv, from 'rtmp://51.210.214.151/arena1/main': Duration: N/A, start: 6088.300000, bitrate: 384 kb/s Stream #0:0: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s [flv @ 0x55ca70db66c0] FLV does not support sample rate 48000, choose from (44100, 22050, 11025) [flv @ 0x55ca70db66c0] Audio codec mp2 not compatible with flv Could not write header for output file #0 (incorrect codec parameters ?): Function not implemented Stream mapping: Stream #0:0 -> #0:0 (copy) Last message repeated 1 times
==30625==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x563eed1d3745 bp 0x7f12a936f0d0 sp 0x7f12a936f0b0 T1) ==30625==The signal is caused by a READ memory access. ==30625==Hint: address points to the zero page. ASAN:DEADLYSIGNAL AddressSanitizer: nested bug in the same thread, aborting.
My operating system is Ubuntu 20.04. Any help will be greatly appreciated.
Description
Please description your issue here
SRS Version: 6.0.65
SRS Log:
Replay
Please describe how to replay the bug?
Step 1: Below is ffprobe out for my source stream codec and information.
Step 2: when we publish this stream with ffmpeg to srs, then srs will crash
Expect
How can we prevent SRS from crashing? Is there a way to validate the source codec of a stream and disable stream publishing? We are currently publishing multiple streams and lack information about the source stream codec, which is causing crashes in SRS.