Skip to content

Commit

Permalink
fix(atemSocket): fix _maxPacketID being off-by-one
Browse files Browse the repository at this point in the history
This would cause every 32768th packet to be dropped. This issue was most noticeable when transferring media to the ATEM.
  • Loading branch information
Alex Van Camp committed Aug 6, 2018
1 parent 2aab326 commit e116c35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/atemSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class AtemSocket extends EventEmitter {
private _retransmitTimer: NodeJS.Timer | undefined

private _localPacketId = 1
private _maxPacketID = 1 << 15 // Atem expects 15 not 16 bits before wrapping
private _maxPacketID = (1 << 15) - 1 // Atem expects 15 not 16 bits before wrapping
private _sessionId: number

private _address: string
Expand Down

0 comments on commit e116c35

Please sign in to comment.