mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
fix ps to h264 frame_size < 0 checkt
This commit is contained in:
parent
b574c43676
commit
18abfd3063
2 changed files with 10 additions and 0 deletions
|
@ -1310,6 +1310,14 @@ srs_error_t SrsGb28181RtmpMuxer::write_h264_ipb_frame2(char *frame, int frame_si
|
|||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
if (!frame){
|
||||
return srs_error_new(ERROR_GB28181_H264_FRAME_FULL, "h264 frame null");
|
||||
}
|
||||
|
||||
if (frame_size <= 0){
|
||||
return srs_error_new(ERROR_GB28181_H264_FRAMESIZE, "h264 frame size");
|
||||
}
|
||||
|
||||
SrsAvcNaluType nal_unit_type = (SrsAvcNaluType)(frame[0] & 0x1f);
|
||||
// ignore the nalu type sei(6) aud(9)
|
||||
if (nal_unit_type == SrsAvcNaluTypeAccessUnitDelimiter ||
|
||||
|
|
|
@ -375,6 +375,8 @@
|
|||
#define ERROR_GB28181_SIP_PTZ_FAILED 6016
|
||||
#define ERROR_GB28181_SIP_NOT_INVITE 6017
|
||||
#define ERROR_GB28181_SIP_PTZ_CMD_INVALID 6018
|
||||
#define ERROR_GB28181_H264_FRAMESIZE 6019
|
||||
#define ERROR_GB28181_H264_FRAME_FULL 6020
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// HTTP API error.
|
||||
|
|
Loading…
Reference in a new issue