aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3_parser.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2008-06-07 22:29:11 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2008-06-07 22:29:11 +0000
commit3596aa6fe61177f7bdc0381defa8f9e6ce85d85b (patch)
tree7ac36f93876ee6bde25ef114e82564a06e931bbf /libavcodec/ac3_parser.c
parent6730e9f300927c37d2016093684222fef63bb740 (diff)
downloadffmpeg-3596aa6fe61177f7bdc0381defa8f9e6ce85d85b.tar.gz
get substreamid from ac3 parser
Originally committed as revision 13689 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3_parser.c')
-rw-r--r--libavcodec/ac3_parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
index 667c6d3821..7e6bea14c9 100644
--- a/libavcodec/ac3_parser.c
+++ b/libavcodec/ac3_parser.c
@@ -99,6 +99,7 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on;
hdr->frame_size = ff_ac3_frame_size_tab[frame_size_code][hdr->sr_code] * 2;
hdr->frame_type = EAC3_FRAME_TYPE_AC3_CONVERT; //EAC3_FRAME_TYPE_INDEPENDENT;
+ hdr->substreamid = 0;
} else {
/* Enhanced AC-3 */
hdr->crc1 = 0;
@@ -106,7 +107,7 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
if(hdr->frame_type == EAC3_FRAME_TYPE_RESERVED)
return AC3_PARSE_ERROR_FRAME_TYPE;
- skip_bits(gbc, 3); // skip substream id
+ hdr->substreamid = get_bits(gbc, 3);
hdr->frame_size = (get_bits(gbc, 11) + 1) << 1;
if(hdr->frame_size < AC3_HEADER_SIZE)