Mercurial > libavcodec.hg
comparison faad.c @ 2967:ef2149182f1c libavcodec
COSMETICS: Remove all trailing whitespace.
author | diego |
---|---|
date | Sat, 17 Dec 2005 18:14:38 +0000 |
parents | 511e3afc43e1 |
children | bfabfdf9ce55 |
comparison
equal
deleted
inserted
replaced
2966:564788471dd4 | 2967:ef2149182f1c |
---|---|
86 faacDecFrameInfo *hInfo, | 86 faacDecFrameInfo *hInfo, |
87 unsigned char *buffer, | 87 unsigned char *buffer, |
88 unsigned long buffer_size); | 88 unsigned long buffer_size); |
89 char* FAADAPI (*faacDecGetErrorMessage)(unsigned char errcode); | 89 char* FAADAPI (*faacDecGetErrorMessage)(unsigned char errcode); |
90 #endif | 90 #endif |
91 | 91 |
92 void FAADAPI (*faacDecClose)(faacDecHandle hDecoder); | 92 void FAADAPI (*faacDecClose)(faacDecHandle hDecoder); |
93 | 93 |
94 | 94 |
95 } FAACContext; | 95 } FAACContext; |
96 | 96 |
97 static const unsigned long faac_srates[] = | 97 static const unsigned long faac_srates[] = |
98 { | 98 { |
99 96000, 88200, 64000, 48000, 44100, 32000, | 99 96000, 88200, 64000, 48000, 44100, 32000, |
141 void *out; | 141 void *out; |
142 #endif | 142 #endif |
143 if(buf_size == 0) | 143 if(buf_size == 0) |
144 return 0; | 144 return 0; |
145 #ifndef FAAD2_VERSION | 145 #ifndef FAAD2_VERSION |
146 out = s->faacDecDecode(s->faac_handle, | 146 out = s->faacDecDecode(s->faac_handle, |
147 (unsigned char*)buf, | 147 (unsigned char*)buf, |
148 &bytesconsumed, | 148 &bytesconsumed, |
149 data, | 149 data, |
150 &samples); | 150 &samples); |
151 samples *= s->sample_size; | 151 samples *= s->sample_size; |
152 if (data_size) | 152 if (data_size) |
153 *data_size = samples; | 153 *data_size = samples; |
154 return (buf_size < (int)bytesconsumed) | 154 return (buf_size < (int)bytesconsumed) |
155 ? buf_size : (int)bytesconsumed; | 155 ? buf_size : (int)bytesconsumed; |
156 #else | 156 #else |
157 | 157 |
158 out = s->faacDecDecode(s->faac_handle, &frame_info, (unsigned char*)buf, (unsigned long)buf_size); | 158 out = s->faacDecDecode(s->faac_handle, &frame_info, (unsigned char*)buf, (unsigned long)buf_size); |
159 | 159 |
160 if (frame_info.error > 0) { | 160 if (frame_info.error > 0) { |
161 av_log(avctx, AV_LOG_ERROR, "faac: frame decoding failed: %s\n", | 161 av_log(avctx, AV_LOG_ERROR, "faac: frame decoding failed: %s\n", |
162 s->faacDecGetErrorMessage(frame_info.error)); | 162 s->faacDecGetErrorMessage(frame_info.error)); |