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:
parent
c779d95246
commit
8515f5a91e
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue