diff options
author | tetsuo55 <tetsuo55@users.sourceforge.net> | 2010-04-09 01:14:58 +0400 |
---|---|---|
committer | tetsuo55 <tetsuo55@users.sourceforge.net> | 2010-04-09 01:14:58 +0400 |
commit | a9b7bf3fb3e1334d8defd05ca4cfae870b4912e5 (patch) | |
tree | 2dab453d94d5e003379a6cc895eceb84c80e23ec /src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/aac_ac3_parser.c | |
parent | aafd49a91f7c2fa9c7103971c16fa6e1b29e8bfd (diff) |
astyle formatting cleanup to make the sourcecode more accessible
switch used: astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren
http://astyle.sourceforge.net/
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1783 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/aac_ac3_parser.c')
-rw-r--r-- | src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/aac_ac3_parser.c | 57 |
1 files changed, 35 insertions, 22 deletions
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/aac_ac3_parser.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/aac_ac3_parser.c index 839608875..3257ae17c 100644 --- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/aac_ac3_parser.c +++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/aac_ac3_parser.c @@ -34,25 +34,34 @@ int ff_aac_ac3_parse(AVCodecParserContext *s1, int new_frame_start;
get_next:
- i=END_NOT_FOUND;
- if(s->remaining_size <= buf_size){
- if(s->remaining_size && !s->need_next_header){
- i= s->remaining_size;
+ i = END_NOT_FOUND;
+ if(s->remaining_size <= buf_size)
+ {
+ if(s->remaining_size && !s->need_next_header)
+ {
+ i = s->remaining_size;
s->remaining_size = 0;
- }else{ //we need a header first
- len=0;
- for(i=s->remaining_size; i<buf_size; i++){
- s->state = (s->state<<8) + buf[i];
- if((len=s->sync(s->state, s, &s->need_next_header, &new_frame_start)))
+ }
+ else //we need a header first
+ {
+ len = 0;
+ for(i = s->remaining_size; i < buf_size; i++)
+ {
+ s->state = (s->state << 8) + buf[i];
+ if((len = s->sync(s->state, s, &s->need_next_header, &new_frame_start)))
break;
}
- if(len<=0){
- i=END_NOT_FOUND;
- }else{
- s->state=0;
- i-= s->header_size -1;
+ if(len <= 0)
+ {
+ i = END_NOT_FOUND;
+ }
+ else
+ {
+ s->state = 0;
+ i -= s->header_size - 1;
s->remaining_size = len;
- if(!new_frame_start || pc->index+i<=0){
+ if(!new_frame_start || pc->index + i <= 0)
+ {
s->remaining_size += i;
goto get_next;
}
@@ -60,7 +69,8 @@ get_next: }
}
- if(ff_combine_frame(pc, i, &buf, &buf_size)<0){
+ if(ff_combine_frame(pc, i, &buf, &buf_size) < 0)
+ {
s->remaining_size -= FFMIN(s->remaining_size, buf_size);
*poutbuf = NULL;
*poutbuf_size = 0;
@@ -77,13 +87,16 @@ get_next: /* allow downmixing to stereo (or mono for AC-3) */
if(avctx->request_channels > 0 &&
- avctx->request_channels < s->channels &&
- (avctx->request_channels <= 2 ||
- (avctx->request_channels == 1 &&
- (avctx->codec_id == CODEC_ID_AC3 ||
- avctx->codec_id == CODEC_ID_EAC3)))) {
+ avctx->request_channels < s->channels &&
+ (avctx->request_channels <= 2 ||
+ (avctx->request_channels == 1 &&
+ (avctx->codec_id == CODEC_ID_AC3 ||
+ avctx->codec_id == CODEC_ID_EAC3))))
+ {
avctx->channels = avctx->request_channels;
- } else if (avctx->codec_id != CODEC_ID_AAC || s->channels) {
+ }
+ else if(avctx->codec_id != CODEC_ID_AAC || s->channels)
+ {
avctx->channels = s->channels;
avctx->channel_layout = s->channel_layout;
}
|