Merge branch 'development' into LTS_development

This commit is contained in:
Thulinma 2016-06-29 10:01:11 +02:00
commit 397280f2cd
2 changed files with 5 additions and 5 deletions

View file

@ -745,7 +745,7 @@ namespace TS {
}
void ProgramMappingEntry::setElementaryPid(int newElementaryPid) {
data[1] = newElementaryPid >> 8 & 0x1F;
data[1] = (newElementaryPid >> 8 & 0x1F) | 0xE0; //0xE0 = three reserved bits
data[2] = newElementaryPid & 0xFF;
}
@ -758,7 +758,7 @@ namespace TS {
}
void ProgramMappingEntry::setESInfo(const std::string & newInfo){
data[3] = (newInfo.size() >> 8) & 0x0F;
data[3] = ((newInfo.size() >> 8) & 0x0F) | 0xF0; //0xF0 = four reserved bits
data[4] = newInfo.size() & 0xFF;
memcpy(data + 5, newInfo.data(), newInfo.size());
}
@ -993,12 +993,12 @@ namespace TS {
if (vidTrack == -1){
vidTrack = *(selectedTracks.begin());
}
PMT.setPCRPID(256 + vidTrack);
PMT.setPCRPID(255 + vidTrack);
PMT.setProgramInfoLength(0);
short id = 0;
ProgramMappingEntry entry = PMT.getEntry(0);
for (std::set<long unsigned int>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){
entry.setElementaryPid(256 + *it);
entry.setElementaryPid(255 + *it);
entry.setESInfo("");
if (myMeta.tracks[*it].codec == "H264"){
entry.setStreamType(0x1B);

View file

@ -33,7 +33,7 @@ namespace Mist {
if (packData.getBytesFree() == 184){
packData.clear();
packData.setPID(256 + thisPacket.getTrackId());
packData.setPID(255 + thisPacket.getTrackId());
packData.setContinuityCounter(++contCounters[packData.getPID()]);
if (first[thisPacket.getTrackId()]){
packData.setUnitStart(1);