Revision e0685bc9 libavcodec/ac3enc.c

View differences:

libavcodec/ac3enc.c
1254 1254
{
1255 1255
    int i, ret;
1256 1256

  
1257
    /* validate channel layout */
1257 1258
    if (!avctx->channel_layout) {
1258 1259
        av_log(avctx, AV_LOG_WARNING, "No channel layout specified. The "
1259 1260
                                      "encoder will guess the layout, but it "
......
1265 1266
        return ret;
1266 1267
    }
1267 1268

  
1268
    /* frequency */
1269
    /* validate sample rate */
1269 1270
    for (i = 0; i < 9; i++) {
1270 1271
        if ((ff_ac3_sample_rate_tab[i / 3] >> (i % 3)) == avctx->sample_rate)
1271 1272
            break;
......
1278 1279
    s->bit_alloc.sr_shift = i % 3;
1279 1280
    s->bit_alloc.sr_code  = i / 3;
1280 1281

  
1281
    /* bitrate & frame size */
1282
    /* validate bit rate */
1282 1283
    for (i = 0; i < 19; i++) {
1283 1284
        if ((ff_ac3_bitrate_tab[i] >> s->bit_alloc.sr_shift)*1000 == avctx->bit_rate)
1284 1285
            break;

Also available in: Unified diff