Fixed packBytePos not being handled correctly
This commit is contained in:
parent
4de8932fe0
commit
76b5a91da6
1 changed files with 3 additions and 3 deletions
|
@ -1224,7 +1224,7 @@ namespace DTSC {
|
||||||
} else {
|
} else {
|
||||||
newKey.setNumber(1);
|
newKey.setNumber(1);
|
||||||
}
|
}
|
||||||
if (packBytePos >= 0) { //For VoD
|
if (packBytePos) { //For VoD
|
||||||
newKey.setBpos(packBytePos);
|
newKey.setBpos(packBytePos);
|
||||||
} else {
|
} else {
|
||||||
newKey.setBpos(0);
|
newKey.setBpos(0);
|
||||||
|
@ -1449,10 +1449,10 @@ namespace DTSC {
|
||||||
//bpos, if >= 0, adds 9 bytes (integer type) and 6 bytes (2+namelen)
|
//bpos, if >= 0, adds 9 bytes (integer type) and 6 bytes (2+namelen)
|
||||||
//keyframe, if true, adds 9 bytes (integer type) and 10 bytes (2+namelen)
|
//keyframe, if true, adds 9 bytes (integer type) and 10 bytes (2+namelen)
|
||||||
//data adds packDataSize+5 bytes (string type) and 6 bytes (2+namelen)
|
//data adds packDataSize+5 bytes (string type) and 6 bytes (2+namelen)
|
||||||
packSendSize = 24 + (packOffset?17:0) + (packBytePos>=0?15:0) + (isKeyframe?19:0) + packDataSize+11;
|
packSendSize = 24 + (packOffset?17:0) + (packBytePos?15:0) + (isKeyframe?19:0) + packDataSize+11;
|
||||||
}
|
}
|
||||||
if (vod != (packBytePos > 0)){
|
if (vod != (packBytePos > 0)){
|
||||||
INFO_MSG("Changing stream from %s to %s (bPos=%lld)", vod?"VoD":"live", (packBytePos >= 0)?"Vod":"live", packBytePos);
|
INFO_MSG("Changing stream from %s to %s (bPos=%lld)", vod?"VoD":"live", packBytePos?"Vod":"live", packBytePos);
|
||||||
}
|
}
|
||||||
vod = (packBytePos > 0);
|
vod = (packBytePos > 0);
|
||||||
live = !vod;
|
live = !vod;
|
||||||
|
|
Loading…
Add table
Reference in a new issue