Commit d2c052a6 by xiongziliang

优化代码逻辑

parent 9e42772b
...@@ -55,13 +55,13 @@ void AACRtmpDecoder::onGetAAC(const char* data, int len, uint32_t stamp) { ...@@ -55,13 +55,13 @@ void AACRtmpDecoder::onGetAAC(const char* data, int len, uint32_t stamp) {
frame->_prefix_size = 0; frame->_prefix_size = 0;
} }
if(len){ if(len > 0){
//追加负载数据 //追加负载数据
frame->_buffer.append(data, len); frame->_buffer.append(data, len);
frame->_dts = stamp; frame->_dts = stamp;
} }
if(size || len){ if(size > 0 || len > 0){
//有adts头或者实际aac负载 //有adts头或者实际aac负载
RtmpCodec::inputFrame(frame); RtmpCodec::inputFrame(frame);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论