Revision 7bc5f6e5

View differences:

libavcodec/aac_ac3_parser.c
67 67
    *poutbuf = buf;
68 68
    *poutbuf_size = buf_size;
69 69

  
70
                    /* update codec info */
71
                    avctx->sample_rate = s->sample_rate;
72
                    /* allow downmixing to stereo (or mono for AC3) */
73
                    if(avctx->request_channels > 0 &&
74
                            avctx->request_channels < s->channels &&
75
                            (avctx->request_channels <= 2 ||
76
                            (avctx->request_channels == 1 &&
77
                            avctx->codec_id == CODEC_ID_AC3))) {
78
                        avctx->channels = avctx->request_channels;
79
                    } else {
80
                        avctx->channels = s->channels;
81
                    }
82
                    avctx->bit_rate = s->bit_rate;
83
                    avctx->frame_size = s->samples;
70
    /* update codec info */
71
    avctx->sample_rate = s->sample_rate;
72
    /* allow downmixing to stereo (or mono for AC3) */
73
    if(avctx->request_channels > 0 &&
74
            avctx->request_channels < s->channels &&
75
            (avctx->request_channels <= 2 ||
76
            (avctx->request_channels == 1 &&
77
            avctx->codec_id == CODEC_ID_AC3))) {
78
        avctx->channels = avctx->request_channels;
79
    } else {
80
        avctx->channels = s->channels;
81
    }
82
    avctx->bit_rate = s->bit_rate;
83
    avctx->frame_size = s->samples;
84 84

  
85 85
    return i;
86 86
}

Also available in: Unified diff