Commit 0411bc65 authored by bwolowiec's avatar bwolowiec

using EAC3_STREAM_TYPE_* instead of numbers


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12571 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent cce014dd
...@@ -83,7 +83,7 @@ static int aac_sync(AACAC3ParseContext *hdr_info) ...@@ -83,7 +83,7 @@ static int aac_sync(AACAC3ParseContext *hdr_info)
static av_cold int aac_parse_init(AVCodecParserContext *s1) static av_cold int aac_parse_init(AVCodecParserContext *s1)
{ {
AACAC3ParseContext *s = s1->priv_data; AACAC3ParseContext *s = s1->priv_data;
s->stream_type = 0; s->stream_type = EAC3_STREAM_TYPE_INDEPENDENT;
s->inbuf_ptr = s->inbuf; s->inbuf_ptr = s->inbuf;
s->header_size = AAC_HEADER_SIZE; s->header_size = AAC_HEADER_SIZE;
s->sync = aac_sync; s->sync = aac_sync;
......
...@@ -84,12 +84,12 @@ int ff_ac3_parse_header(const uint8_t buf[7], AC3HeaderInfo *hdr) ...@@ -84,12 +84,12 @@ int ff_ac3_parse_header(const uint8_t buf[7], AC3HeaderInfo *hdr)
hdr->bit_rate = (ff_ac3_bitrate_tab[frame_size_code>>1] * 1000) >> hdr->sr_shift; hdr->bit_rate = (ff_ac3_bitrate_tab[frame_size_code>>1] * 1000) >> hdr->sr_shift;
hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on; 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_size = ff_ac3_frame_size_tab[frame_size_code][hdr->sr_code] * 2;
hdr->stream_type = 0; hdr->stream_type = EAC3_STREAM_TYPE_INDEPENDENT;
} else { } else {
/* Enhanced AC-3 */ /* Enhanced AC-3 */
hdr->crc1 = 0; hdr->crc1 = 0;
hdr->stream_type = get_bits(&gbc, 2); hdr->stream_type = get_bits(&gbc, 2);
if(hdr->stream_type == 3) if(hdr->stream_type == EAC3_STREAM_TYPE_RESERVED)
return AC3_PARSE_ERROR_STREAM_TYPE; return AC3_PARSE_ERROR_STREAM_TYPE;
skip_bits(&gbc, 3); // skip substream id skip_bits(&gbc, 3); // skip substream id
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment