removal of stream_type in AACAC3ParseContext and adding AACAC3FrameFlag

Originally committed as revision 12622 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Bartlomiej Wolowiec
2008-03-28 19:59:58 +00:00
parent 5610f20ed4
commit be1e2a2bfa
4 changed files with 24 additions and 7 deletions

View File

@@ -123,7 +123,7 @@ int ff_ac3_parse_header(const uint8_t buf[7], AC3HeaderInfo *hdr)
return 0;
}
static int ac3_sync(AACAC3ParseContext *hdr_info)
static int ac3_sync(AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag)
{
int err;
AC3HeaderInfo hdr;
@@ -137,6 +137,18 @@ static int ac3_sync(AACAC3ParseContext *hdr_info)
hdr_info->bit_rate = hdr.bit_rate;
hdr_info->channels = hdr.channels;
hdr_info->samples = AC3_FRAME_SIZE;
switch(hdr.stream_type){
case EAC3_STREAM_TYPE_INDEPENDENT:
*flag = FRAME_START;
break;
case EAC3_STREAM_TYPE_DEPENDENT:
*flag = FRAME_CONTINUATION;
break;
case EAC3_STREAM_TYPE_AC3_CONVERT:
*flag = FRAME_COMPLETE;
break;
}
return hdr.frame_size;
}