Revision 6808a8ea

View differences:

libavcodec/aac_parser.c
83 83
static av_cold int aac_parse_init(AVCodecParserContext *s1)
84 84
{
85 85
    AACAC3ParseContext *s = s1->priv_data;
86
    s->stream_type = 0;
86
    s->stream_type = EAC3_STREAM_TYPE_INDEPENDENT;
87 87
    s->inbuf_ptr = s->inbuf;
88 88
    s->header_size = AAC_HEADER_SIZE;
89 89
    s->sync = aac_sync;
libavcodec/ac3_parser.c
84 84
        hdr->bit_rate = (ff_ac3_bitrate_tab[frame_size_code>>1] * 1000) >> hdr->sr_shift;
85 85
        hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on;
86 86
        hdr->frame_size = ff_ac3_frame_size_tab[frame_size_code][hdr->sr_code] * 2;
87
        hdr->stream_type = 0;
87
        hdr->stream_type = EAC3_STREAM_TYPE_INDEPENDENT;
88 88
    } else {
89 89
        /* Enhanced AC-3 */
90 90
        hdr->crc1 = 0;
91 91
        hdr->stream_type = get_bits(&gbc, 2);
92
        if(hdr->stream_type == 3)
92
        if(hdr->stream_type == EAC3_STREAM_TYPE_RESERVED)
93 93
            return AC3_PARSE_ERROR_STREAM_TYPE;
94 94

  
95 95
        skip_bits(&gbc, 3); // skip substream id

Also available in: Unified diff