comparison aac.c @ 10307:4e1d3e37bba0 libavcodec

Reindent after last commit
author superdump
date Mon, 28 Sep 2009 15:35:51 +0000
parents c97a6cabee62
children 28b0f87cfdf1
comparison
equal deleted inserted replaced
10306:c97a6cabee62 10307:4e1d3e37bba0
188 memset(ac->tag_che_map, 0, 4 * MAX_ELEM_ID * sizeof(ac->che[0][0])); 188 memset(ac->tag_che_map, 0, 4 * MAX_ELEM_ID * sizeof(ac->che[0][0]));
189 ac->tags_mapped = 0; 189 ac->tags_mapped = 0;
190 190
191 avctx->channel_layout = aac_channel_layout[channel_config - 1]; 191 avctx->channel_layout = aac_channel_layout[channel_config - 1];
192 } else { 192 } else {
193 /* Allocate or free elements depending on if they are in the 193 /* Allocate or free elements depending on if they are in the
194 * current program configuration. 194 * current program configuration.
195 * 195 *
196 * Set up default 1:1 output mapping. 196 * Set up default 1:1 output mapping.
197 * 197 *
198 * For a 5.1 stream the output order will be: 198 * For a 5.1 stream the output order will be:
199 * [ Center ] [ Front Left ] [ Front Right ] [ LFE ] [ Surround Left ] [ Surround Right ] 199 * [ Center ] [ Front Left ] [ Front Right ] [ LFE ] [ Surround Left ] [ Surround Right ]
200 */ 200 */
201 201
202 for (i = 0; i < MAX_ELEM_ID; i++) { 202 for (i = 0; i < MAX_ELEM_ID; i++) {
203 for (type = 0; type < 4; type++) { 203 for (type = 0; type < 4; type++) {
204 if (che_pos[type][i]) { 204 if (che_pos[type][i]) {
205 if (!ac->che[type][i] && !(ac->che[type][i] = av_mallocz(sizeof(ChannelElement)))) 205 if (!ac->che[type][i] && !(ac->che[type][i] = av_mallocz(sizeof(ChannelElement))))
206 return AVERROR(ENOMEM); 206 return AVERROR(ENOMEM);
207 if (type != TYPE_CCE) { 207 if (type != TYPE_CCE) {
208 ac->output_data[channels++] = ac->che[type][i]->ch[0].ret; 208 ac->output_data[channels++] = ac->che[type][i]->ch[0].ret;
209 if (type == TYPE_CPE) { 209 if (type == TYPE_CPE) {
210 ac->output_data[channels++] = ac->che[type][i]->ch[1].ret; 210 ac->output_data[channels++] = ac->che[type][i]->ch[1].ret;
211 }
211 } 212 }
212 } 213 } else
213 } else 214 av_freep(&ac->che[type][i]);
214 av_freep(&ac->che[type][i]); 215 }
215 } 216 }
216 }
217 217
218 memcpy(ac->tag_che_map, ac->che, 4 * MAX_ELEM_ID * sizeof(ac->che[0][0])); 218 memcpy(ac->tag_che_map, ac->che, 4 * MAX_ELEM_ID * sizeof(ac->che[0][0]));
219 ac->tags_mapped = 4 * MAX_ELEM_ID; 219 ac->tags_mapped = 4 * MAX_ELEM_ID;
220 220
221 avctx->channel_layout = 0; 221 avctx->channel_layout = 0;