1
1
import { IGetToken } from 'strtok3/lib/core' ;
2
2
import * as Token from 'token-types' ;
3
+ import { stripNulls } from '../common/Util' ;
3
4
4
5
export interface IBroadcastAudioExtensionChunk {
5
6
description : string ;
@@ -22,11 +23,11 @@ export const BroadcastAudioExtensionChunk: IGetToken<IBroadcastAudioExtensionChu
22
23
23
24
get : ( uint8array , off ) => {
24
25
return {
25
- description : new Token . StringType ( 256 , 'ascii' ) . get ( uint8array , off ) . trim ( ) ,
26
- originator : new Token . StringType ( 32 , 'ascii' ) . get ( uint8array , off + 256 ) . trim ( ) ,
27
- originatorReference : new Token . StringType ( 32 , 'ascii' ) . get ( uint8array , off + 288 ) . trim ( ) ,
28
- originationDate : new Token . StringType ( 10 , 'ascii' ) . get ( uint8array , off + 320 ) . trim ( ) ,
29
- originationTime : new Token . StringType ( 8 , 'ascii' ) . get ( uint8array , off + 330 ) . trim ( ) ,
26
+ description : stripNulls ( new Token . StringType ( 256 , 'ascii' ) . get ( uint8array , off ) ) . trim ( ) ,
27
+ originator : stripNulls ( new Token . StringType ( 32 , 'ascii' ) . get ( uint8array , off + 256 ) ) . trim ( ) ,
28
+ originatorReference : stripNulls ( new Token . StringType ( 32 , 'ascii' ) . get ( uint8array , off + 288 ) ) . trim ( ) ,
29
+ originationDate : stripNulls ( new Token . StringType ( 10 , 'ascii' ) . get ( uint8array , off + 320 ) ) . trim ( ) ,
30
+ originationTime : stripNulls ( new Token . StringType ( 8 , 'ascii' ) . get ( uint8array , off + 330 ) ) . trim ( ) ,
30
31
timeReferenceLow : Token . UINT32_LE . get ( uint8array , off + 338 ) ,
31
32
timeReferenceHigh : Token . UINT32_LE . get ( uint8array , off + 342 ) ,
32
33
version : Token . UINT16_LE . get ( uint8array , off + 346 ) ,
0 commit comments