Revision 6808a8ea libavcodec/ac3_parser.c

View differences:

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