mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 20:47:08 +08:00
完善MP4点播
This commit is contained in:
parent
47d8e37e3d
commit
0a31b03064
@ -136,13 +136,12 @@ bool MP4Reader::seekTo(uint32_t ui32Stamp){
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//搜索到下一帧关键帧
|
//搜索到下一帧关键帧
|
||||||
bool eof = false;
|
|
||||||
bool keyFrame = false;
|
bool keyFrame = false;
|
||||||
while (!eof) {
|
while (true) {
|
||||||
auto frame = _demuxer->readFrame(keyFrame);
|
auto frame = _demuxer->readFrame(keyFrame);
|
||||||
if(!frame){
|
if(!frame){
|
||||||
eof = true;
|
//文件读完了都未找到下一帧关键帧
|
||||||
break;
|
return false;
|
||||||
}
|
}
|
||||||
if(keyFrame || frame->keyFrame() || frame->configFrame()){
|
if(keyFrame || frame->keyFrame() || frame->configFrame()){
|
||||||
//定位到key帧
|
//定位到key帧
|
||||||
|
Loading…
Reference in New Issue
Block a user