part 1 of EAC3 support

Originally committed as revision 12896 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-04-19 02:28:24 +00:00
parent 133ac890fb
commit 8629e7562d

View file

@ -33,9 +33,10 @@ int ff_aac_ac3_parse(AVCodecParserContext *s1,
int len, i;
int new_frame_start;
get_next:
i=END_NOT_FOUND;
if(s->remaining_size <= buf_size){
if(s->remaining_size){
if(s->remaining_size && !s->need_next_header){
i= s->remaining_size;
s->remaining_size = 0;
}else{ //we need a header first
@ -50,6 +51,8 @@ int ff_aac_ac3_parse(AVCodecParserContext *s1,
}else{
i-= s->header_size -1;
s->remaining_size = len + i;
if(!new_frame_start)
goto get_next;
}
}
}