diff options
| author | Brad Midgley <bmidgley@xmission.com> | 2007-12-13 17:16:20 +0000 | 
|---|---|---|
| committer | Brad Midgley <bmidgley@xmission.com> | 2007-12-13 17:16:20 +0000 | 
| commit | 2e6b3caf16b973b4bcf71ae1f31d5c8276939f70 (patch) | |
| tree | 193524d440776b8407fc0e68da4d0a532b6b8d26 | |
| parent | e83ac56743aa266dbb05b7f8102ae0c73bd1bddf (diff) | |
don't need to memset the data header
| -rw-r--r-- | sbc/sbc.c | 12 | 
1 files changed, 4 insertions, 8 deletions
| @@ -977,23 +977,19 @@ static int sbc_pack_frame(uint8_t *data, struct sbc_frame *frame, size_t len)  	u_int32_t scalefactor[2][8];	/* derived from frame->scale_factor */ -	/* Clear first 4 bytes of data (that's the constant length part of the -	 * SBC header) */ -	memset(data, 0, 4); -  	data[0] = SBC_SYNCWORD;  	if (frame->sampling_frequency == 16000) { -		data[1] |= (SBC_FS_16 & 0x03) << 6; +		data[1] = (SBC_FS_16 & 0x03) << 6;  		sf = SBC_FS_16;  	} else if (frame->sampling_frequency == 32000) { -		data[1] |= (SBC_FS_32 & 0x03) << 6; +		data[1] = (SBC_FS_32 & 0x03) << 6;  		sf = SBC_FS_32;  	} else if (frame->sampling_frequency == 44100) { -		data[1] |= (SBC_FS_44 & 0x03) << 6; +		data[1] = (SBC_FS_44 & 0x03) << 6;  		sf = SBC_FS_44;  	} else if (frame->sampling_frequency == 48000) { -		data[1] |= (SBC_FS_48 & 0x03) << 6; +		data[1] = (SBC_FS_48 & 0x03) << 6;  		sf = SBC_FS_48;  	} else  		return -2; | 
