HLS: hls播放器解析ts失败时,清空数据以便恢复播放

This commit is contained in:
ziyue 2021-12-24 19:58:27 +08:00
parent b1f68b9563
commit 3d44c772ac

View File

@ -259,7 +259,13 @@ void HlsPlayer::playDelay() {
}
void HlsPlayer::onPacket_l(const char *data, size_t len) {
try {
_segment.input(data, len);
} catch (...) {
//ts解析失败清空缓存数据
_segment.reset();
throw;
}
}
//////////////////////////////////////////////////////////////////////////