aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3_parser.c
diff options
context:
space:
mode:
authorBartlomiej Wolowiec <bartek.wolowiec@gmail.com>2008-03-28 19:59:58 +0000
committerBartlomiej Wolowiec <bartek.wolowiec@gmail.com>2008-03-28 19:59:58 +0000
commitbe1e2a2bfa592ff14355c6b97e90c530e2c0fcc0 (patch)
treea9d7171af4f5eda9a96a8aff32b824034df9b474 /libavcodec/ac3_parser.c
parent5610f20ed4358af3c1380ceb79ee51e258df79bf (diff)
downloadffmpeg-be1e2a2bfa592ff14355c6b97e90c530e2c0fcc0.tar.gz
removal of stream_type in AACAC3ParseContext and adding AACAC3FrameFlag
Originally committed as revision 12622 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3_parser.c')
-rw-r--r--libavcodec/ac3_parser.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
index 7f0818b607..ea7f592082 100644
--- a/libavcodec/ac3_parser.c
+++ b/libavcodec/ac3_parser.c
@@ -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;
}