Revision d3f126df libavcodec/mlpdec.c

View differences:

libavcodec/mlpdec.c
329 329
    for (substr = 0; substr < MAX_SUBSTREAMS; substr++)
330 330
        m->substream[substr].restart_seen = 0;
331 331

  
332
    if (mh.stream_type == 0xbb) {
333
        /* MLP stream */
334
        m->avctx->channel_layout = ff_mlp_layout[mh.channels_mlp];
335
    } else { /* mh.stream_type == 0xba */
336
        /* TrueHD stream */
337
        if (mh.channels_thd_stream2) {
338
            m->avctx->channel_layout = ff_truehd_layout(mh.channels_thd_stream2);
339
        } else {
340
            m->avctx->channel_layout = ff_truehd_layout(mh.channels_thd_stream1);
341
        }
342
        if (m->avctx->channels &&
343
            av_get_channel_layout_nb_channels(m->avctx->channel_layout) != m->avctx->channels) {
344
            m->avctx->channel_layout = 0;
345
            av_log_ask_for_sample(m->avctx, "Unknown channel layout.");
346
        }
347
    }
348

  
332 349
    m->needs_reordering = mh.channels_mlp >= 18 && mh.channels_mlp <= 20;
333 350

  
334 351
    return 0;

Also available in: Unified diff