Revision be187388 libavcodec/ac3_parser.c

View differences:

libavcodec/ac3_parser.c
69 69

  
70 70
        skip_bits(gbc, 5); // skip bsid, already got it
71 71

  
72
        skip_bits(gbc, 3); // skip bitstream mode
72
        hdr->bitstream_mode = get_bits(gbc, 3);
73 73
        hdr->channel_mode = get_bits(gbc, 3);
74 74

  
75 75
        if(hdr->channel_mode == AC3_CHMODE_STEREO) {
......
151 151
    hdr_info->channels = hdr.channels;
152 152
    hdr_info->channel_layout = hdr.channel_layout;
153 153
    hdr_info->samples = hdr.num_blocks * 256;
154
    hdr_info->service_type = hdr.bitstream_mode;
155
    if (hdr.bitstream_mode == 0x7 && hdr.channels > 1)
156
        hdr_info->service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;
154 157
    if(hdr.bitstream_id>10)
155 158
        hdr_info->codec_id = CODEC_ID_EAC3;
156 159
    else if (hdr_info->codec_id == CODEC_ID_NONE)

Also available in: Unified diff