mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-23 03:10:04 +08:00
修复一个hls相关的一个bug
This commit is contained in:
parent
4c760d010a
commit
68da7c2fb7
@ -160,7 +160,9 @@ void HLSMaker::inputH264(void *data, uint32_t length, uint32_t timeStamp) {
|
||||
}
|
||||
case H264Frame::NAL_B_P: //P
|
||||
//insert aud frame before p and SPS frame
|
||||
_ts.inputH264("\x0\x0\x0\x1\x9\xf0", 6, timeStamp * 90);
|
||||
if(timeStamp != _ui32LastFrameStamp){
|
||||
_ts.inputH264("\x0\x0\x0\x1\x9\xf0", 6, timeStamp * 90);
|
||||
}
|
||||
case H264Frame::NAL_IDR: //IDR
|
||||
case H264Frame::NAL_PPS: //PPS
|
||||
_ts.inputH264((char *) data, length, timeStamp * 90);
|
||||
@ -168,6 +170,8 @@ void HLSMaker::inputH264(void *data, uint32_t length, uint32_t timeStamp) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
_ui32LastFrameStamp = timeStamp;
|
||||
}
|
||||
|
||||
void HLSMaker::inputAAC(void *data, uint32_t length, uint32_t timeStamp) {
|
||||
|
@ -80,6 +80,7 @@ private:
|
||||
uint64_t _ui64TsCnt;
|
||||
uint32_t _ui32BufSize;
|
||||
uint32_t _ui32LastStamp;
|
||||
uint32_t _ui32LastFrameStamp = 0;
|
||||
std::deque<int> _iDurations;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user