Fixed livepeer process disconnecting track 0 instead of actual track ID
This commit is contained in:
parent
6c66a4adb3
commit
b1740e9bd3
1 changed files with 5 additions and 3 deletions
|
@ -228,10 +228,11 @@ namespace Mist{
|
||||||
if (S.lastPacket >= statSinkMs){statSinkMs = S.lastPacket;}
|
if (S.lastPacket >= statSinkMs){statSinkMs = S.lastPacket;}
|
||||||
}
|
}
|
||||||
trackId = (S.ID << 16) + thisPacket.getTrackId();
|
trackId = (S.ID << 16) + thisPacket.getTrackId();
|
||||||
size_t idx = M.trackIDToIndex(trackId, getpid());
|
thisIdx = M.trackIDToIndex(trackId, getpid());
|
||||||
if (idx == INVALID_TRACK_ID || !M.getCodec(idx).size()){
|
if (thisIdx == INVALID_TRACK_ID || !M.getCodec(thisIdx).size()){
|
||||||
INFO_MSG("Initializing track %zi as %" PRIu64 " for playlist %zu", thisPacket.getTrackId(), trackId, S.ID);
|
INFO_MSG("Initializing track %zi as %" PRIu64 " for playlist %zu", thisPacket.getTrackId(), trackId, S.ID);
|
||||||
S.S.initializeMetadata(meta, thisPacket.getTrackId(), trackId);
|
S.S.initializeMetadata(meta, thisPacket.getTrackId(), trackId);
|
||||||
|
thisIdx = M.trackIDToIndex(trackId, getpid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (S.byteOffset >= S.data.size() && !S.S.hasPacket()){
|
if (S.byteOffset >= S.data.size() && !S.S.hasPacket()){
|
||||||
|
@ -254,7 +255,8 @@ namespace Mist{
|
||||||
//overwrite trackID
|
//overwrite trackID
|
||||||
Bit::htobl(data + 8, trackId);
|
Bit::htobl(data + 8, trackId);
|
||||||
//overwrite packettime
|
//overwrite packettime
|
||||||
Bit::htobll(data + 12, thisPacket.getTime() + timeOffset);
|
thisTime = thisPacket.getTime() + timeOffset;
|
||||||
|
Bit::htobll(data + 12, thisTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool checkArguments(){return true;}
|
bool checkArguments(){return true;}
|
||||||
|
|
Loading…
Add table
Reference in a new issue