Changeset 217
- Timestamp:
- 06/10/08 21:35:30
(3 months ago)
- Author:
- sip
- Message:
Remove static noise variable
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r216 |
r217 |
|
| 164 | 164 | static short if2stuffing[16] = {5, 5, 6, 6, 0, 5, 0, 0, 5, 1, 6, 7, -1, -1, -1, 4}; |
|---|
| 165 | 165 | |
|---|
| | 166 | /* 1st dummy AMR-SID frame (comfort noise) */ |
|---|
| | 167 | static unsigned char last_amr_sti[6] = { 0x78, 0x46, 0x00, 0x94, 0xA4, 0x07 }; |
|---|
| | 168 | |
|---|
| 166 | 169 | struct video_creator |
|---|
| 167 | 170 | { |
|---|
| … | … | |
| 185 | 188 | unsigned char* data = 0; |
|---|
| 186 | 189 | |
|---|
| 187 | | /* 1st dummy AMR-SID frame (comfort noise) */ |
|---|
| 188 | | static unsigned char last_amr_sti[6] = { 0x78, 0x46, 0x00, 0x94, 0xA4, 0x07 }; |
|---|
| 189 | | |
|---|
| 190 | | |
|---|
| 191 | 190 | /* Get data & size */ |
|---|
| 192 | 191 | unsigned char * framedata = FrameGetData(frame); |
|---|
| … | … | |
| 218 | 217 | /*Get mode*/ |
|---|
| 219 | 218 | unsigned char mode = header & 0x0F; |
|---|
| 220 | | |
|---|
| 221 | | /* Check silence frames */ |
|---|
| 222 | | if (mode==8 && framelength==6) { |
|---|
| 223 | | /* save AMR-SID frame */ |
|---|
| 224 | | memcpy( last_amr_sti, framedata, 6 ); |
|---|
| 225 | | } else if (mode==15) { |
|---|
| | 219 | |
|---|
| | 220 | /* Check fom AMR No-Data packe */ |
|---|
| | 221 | if (mode==15) |
|---|
| | 222 | { |
|---|
| 226 | 223 | /* AMR No-Data packet --> replace with last AMR-SID */ |
|---|
| 227 | | mode = 8; |
|---|
| 228 | 224 | framelength = 6; |
|---|
| 229 | 225 | framedata = last_amr_sti; |
|---|
Download in other formats:
|
|