Revision 4a24837e libavcodec/dca.c

View differences:

libavcodec/dca.c
1173 1173
        s->output = DCA_STEREO;
1174 1174
    }
1175 1175

  
1176
    avctx->channels = channels;
1176
    /* There is nothing that prevents a dts frame to change channel configuration
1177
       but FFmpeg doesn't support that so only set the channels if it is previously
1178
       unset. Ideally during the first probe for channels the crc should be checked
1179
       and only set avctx->channels when the crc is ok. Right now the decoder could
1180
       set the channels based on a broken first frame.*/
1181
    if (!avctx->channels)
1182
        avctx->channels = channels;
1183

  
1177 1184
    if(*data_size < (s->sample_blocks / 8) * 256 * sizeof(int16_t) * channels)
1178 1185
        return -1;
1179 1186
    *data_size = 0;

Also available in: Unified diff