Revision be187388 libavcodec/ac3dec.c

View differences:

libavcodec/ac3dec.c
273 273

  
274 274
    /* get decoding parameters from header info */
275 275
    s->bit_alloc_params.sr_code     = hdr.sr_code;
276
    s->bitstream_mode               = hdr.bitstream_mode;
276 277
    s->channel_mode                 = hdr.channel_mode;
277 278
    s->channel_layout               = hdr.channel_layout;
278 279
    s->lfe_on                       = hdr.lfe_on;
......
1399 1400
        if(s->out_channels < s->channels)
1400 1401
            s->output_mode  = s->out_channels == 1 ? AC3_CHMODE_MONO : AC3_CHMODE_STEREO;
1401 1402
    }
1403
    /* set audio service type based on bitstream mode for AC-3 */
1404
    avctx->audio_service_type = s->bitstream_mode;
1405
    if (s->bitstream_mode == 0x7 && s->channels > 1)
1406
        avctx->audio_service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;
1402 1407

  
1403 1408
    /* decode the audio blocks */
1404 1409
    channel_map = ff_ac3_dec_channel_map[s->output_mode & ~AC3_OUTPUT_LFEON][s->lfe_on];

Also available in: Unified diff