Skip to content

Commit

Permalink
Make SymbolSize and NumSourceBlocks independent
Browse files Browse the repository at this point in the history
That is, do not get them from the wrapped encoder but calculate and
return them using common and scheme-specific OTI.
  • Loading branch information
Eugene Kim committed Dec 18, 2018
1 parent 0331f46 commit dbba71b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/impl/libraptorq/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ func (dec *Decoder) TransferLength() uint64 {
}

func (dec *Decoder) SymbolSize() uint16 {
return dec.wrapped.Symbol_size()
return uint16(dec.commonOTI)
}

func (dec *Decoder) SchemeSpecificOTI() uint32 {
return dec.schemeSpecificOTI
}

func (dec *Decoder) NumSourceBlocks() uint8 {
return dec.wrapped.Blocks()
return uint8(dec.schemeSpecificOTI >> 24)
}

func (dec *Decoder) SourceBlockSize(sbn uint8) uint32 {
Expand Down

0 comments on commit dbba71b

Please sign in to comment.