mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 20:47:08 +08:00
修复"Too short data for FU-A H.264 RTP packet"的问题
This commit is contained in:
parent
514a028eac
commit
e021279fab
@ -204,8 +204,8 @@ void H264RtpEncoder::packRtp(const char *ptr, size_t len, uint32_t pts, bool is_
|
|||||||
}
|
}
|
||||||
|
|
||||||
void H264RtpEncoder::packRtpFu(const char *ptr, size_t len, uint32_t pts, bool is_mark, bool gop_pos){
|
void H264RtpEncoder::packRtpFu(const char *ptr, size_t len, uint32_t pts, bool is_mark, bool gop_pos){
|
||||||
auto packet_size = getMaxSize() - 1;
|
auto packet_size = getMaxSize() - 2;
|
||||||
if (len <= packet_size) {
|
if (len <= packet_size + 1) {
|
||||||
//小于FU-A打包最小字节长度要求,采用STAP-A模式
|
//小于FU-A打包最小字节长度要求,采用STAP-A模式
|
||||||
packRtpStapA(ptr, len, pts, is_mark, gop_pos);
|
packRtpStapA(ptr, len, pts, is_mark, gop_pos);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user