1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-15 04:42:04 +00:00

incomplete_len 在大华摄像头下,因为大华包头对音频的不标准处理,可能为负值,而sizeof(SrsPsPacketStartCode) 返回的是unsigned 类型, 因些增加判断 (#2039)

Co-authored-by: jesse.xi <jj.xi@tianrang-inc.com>
This commit is contained in:
Jesse Xi 2020-11-17 16:44:37 +08:00 committed by GitHub
parent c779d95246
commit 8515f5a91e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -954,7 +954,8 @@ srs_error_t SrsPsStreamDemixer::on_ps_stream(char* ps_data, int ps_size, uint32_
ps_fw.write(ps_data, ps_size, NULL); ps_fw.write(ps_data, ps_size, NULL);
#endif #endif
while(incomplete_len >= sizeof(SrsPsPacketStartCode)) while(incomplete_len > 0
&& incomplete_len >= sizeof(SrsPsPacketStartCode))
{ {
if (next_ps_pack if (next_ps_pack
&& next_ps_pack[0] == (char)0x00 && next_ps_pack[0] == (char)0x00