[FFmpeg-devel] [PATCH 2/4] lavc/aac_ac3_parser: style tweaks
Rodger Combs
rodger.combs at gmail.com
Tue Sep 22 04:50:32 CEST 2015
---
libavcodec/aac_ac3_parser.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index 2f7d568..dfa951e 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -36,25 +36,25 @@ 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;
}
@@ -62,7 +62,7 @@ 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;
--
2.5.1
More information about the ffmpeg-devel
mailing list