mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix ps to h264 frame_size < 0 checkt
This commit is contained in:
parent
83c2586d79
commit
1bbf5c8126
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;
|
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);
|
SrsAvcNaluType nal_unit_type = (SrsAvcNaluType)(frame[0] & 0x1f);
|
||||||
// ignore the nalu type sei(6) aud(9)
|
// ignore the nalu type sei(6) aud(9)
|
||||||
if (nal_unit_type == SrsAvcNaluTypeAccessUnitDelimiter ||
|
if (nal_unit_type == SrsAvcNaluTypeAccessUnitDelimiter ||
|
||||||
|
|
|
@ -376,6 +376,8 @@
|
||||||
#define ERROR_GB28181_SIP_PTZ_FAILED 6016
|
#define ERROR_GB28181_SIP_PTZ_FAILED 6016
|
||||||
#define ERROR_GB28181_SIP_NOT_INVITE 6017
|
#define ERROR_GB28181_SIP_NOT_INVITE 6017
|
||||||
#define ERROR_GB28181_SIP_PTZ_CMD_INVALID 6018
|
#define ERROR_GB28181_SIP_PTZ_CMD_INVALID 6018
|
||||||
|
#define ERROR_GB28181_H264_FRAMESIZE 6019
|
||||||
|
#define ERROR_GB28181_H264_FRAME_FULL 6020
|
||||||
|
|
||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
// HTTP API error.
|
// HTTP API error.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue