Fixed resetting rollOver count on seek for VoD TS files.

This commit is contained in:
Erik Zandvliet 2017-10-26 14:32:16 +02:00 committed by Thulinma
parent 058242842f
commit e2e2193345
3 changed files with 7 additions and 1 deletions

View file

@ -472,6 +472,11 @@ namespace TS{
free(payload);
}
void Stream::setLastms(uint32_t tid, uint64_t timestamp){
lastms[tid] = timestamp;
rolloverCount[tid] = timestamp / TS_PTS_ROLLOVER;
}
void Stream::parseBitstream(uint32_t tid, const char *pesPayload, uint32_t realPayloadSize,
uint64_t timeStamp, int64_t timeOffset, uint64_t bPos, bool alignment){
//INFO_MSG("timestamp: %llu offset: %lld", timeStamp, timeOffset);

View file

@ -61,6 +61,7 @@ namespace TS{
uint64_t timeStamp, int64_t timeOffset, uint64_t bPos, bool alignment);
std::set<unsigned long> getActiveTracks();
void setLastms(uint32_t tid, uint64_t timestamp);
private:
unsigned long long lastPAT;
ProgramAssociationTable associationTable;
@ -85,7 +86,6 @@ namespace TS{
std::map<unsigned long, std::string> mpeg2SeqExt;
std::map<unsigned long, std::string> mp2Hdr;
std::map<unsigned int, size_t> rolloverCount;
std::map<unsigned int, unsigned long long> lastms;

View file

@ -358,6 +358,7 @@ namespace Mist {
break;
}
thisBPos = keyIt->getBpos();
tsStream.setLastms(*it, keyIt->getTime());
}
if (thisBPos < seekPos) {
seekPos = thisBPos;