添加最大帧长度参数

This commit is contained in:
xiongziliang
2020-09-06 17:50:24 +08:00
parent 90622a30fa
commit 9bfbe02f73
2 changed files with 9 additions and 8 deletions

View File

@@ -28,8 +28,9 @@ public:
/**
* 构造函数
* @param codec 编码id
* @param max_frame_size 允许的最大帧大小
*/
CommonRtpDecoder(CodecId codec);
CommonRtpDecoder(CodecId codec, int max_frame_size = 2 * 1024);
/**
* 返回编码类型ID
@@ -47,10 +48,11 @@ private:
void obtainFrame();
private:
bool _drop_flag = false;
uint16_t _last_seq = 0;
int _max_frame_size;
CodecId _codec;
FrameImp::Ptr _frame;
uint16_t _last_seq = 0;
bool _drop_flag = false;
};
/**