fix ps to h264 frame_size < 0 checkt

pull/1830/head^2
kyxlx550 5 years ago
parent b574c43676
commit 18abfd3063

@ -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…
Cancel
Save