Updated TS protocols to use proper DTS/PTS using new lib calls.

This commit is contained in:
Thulinma 2015-02-12 15:58:19 +01:00
parent 30866407e0
commit 8e6da507bc
3 changed files with 3 additions and 3 deletions

View file

@ -172,7 +172,7 @@ namespace Mist {
std::string bs;
//prepare bufferstring
if (myMeta.tracks[currentPacket.getTrackId()].type == "video"){
bs = TS::Packet::getPESVideoLeadIn(0ul, currentPacket.getTime() * 90);
bs = TS::Packet::getPESVideoLeadIn(0ul, currentPacket.getTime() * 90, currentPacket.getInt("offset") * 90);
fillPacket(first, bs.data(), bs.size(), VideoCounter);
if (myMeta.tracks[currentPacket.getTrackId()].codec == "H264"){
//End of previous nal unit, somehow needed for h264

View file

@ -67,7 +67,7 @@ namespace Mist {
std::string bs;
//prepare bufferstring
if (myMeta.tracks[currentPacket.getTrackId()].type == "video"){
bs = TS::Packet::getPESVideoLeadIn(0ul, currentPacket.getTime() * 90);
bs = TS::Packet::getPESVideoLeadIn(0ul, currentPacket.getTime() * 90, currentPacket.getInt("offset") * 90);
fillPacket(first, bs.data(), bs.size(), VideoCounter);
if (currentPacket.getInt("keyframe")){

View file

@ -96,7 +96,7 @@ namespace Mist {
std::string bs;
//prepare bufferstring
if (myMeta.tracks[currentPacket.getTrackId()].type == "video"){
bs = TS::Packet::getPESVideoLeadIn(0ul, currentPacket.getTime() * 90);
bs = TS::Packet::getPESVideoLeadIn(0ul, currentPacket.getTime() * 90, currentPacket.getInt("offset") * 90);
fillPacket(first, bs.data(), bs.size(),VideoCounter);
if (currentPacket.getInt("keyframe")){