comparison vorbis_enc.c @ 3906:5ae5224790d3 libavcodec

Original Commit: r107 | ods15 | 2006-10-01 18:13:12 +0200 (Sun, 01 Oct 2006) | 2 lines give proper error message for channels!=2
author ods15
date Mon, 02 Oct 2006 06:09:36 +0000
parents 557b95209664
children 5f5525341673
comparison
equal deleted inserted replaced
3905:557b95209664 3906:5ae5224790d3
1360 1360
1361 static int vorbis_encode_init(AVCodecContext * avccontext) 1361 static int vorbis_encode_init(AVCodecContext * avccontext)
1362 { 1362 {
1363 venc_context_t * venc = avccontext->priv_data; 1363 venc_context_t * venc = avccontext->priv_data;
1364 1364
1365 if (avccontext->channels != 2) return -1; 1365 if (avccontext->channels != 2) {
1366 av_log(avccontext, AV_LOG_ERROR, "Current FFmpeg Vorbis encoder only supports 2 channels.\n");
1367 return -1;
1368 }
1366 1369
1367 create_vorbis_context(venc, avccontext); 1370 create_vorbis_context(venc, avccontext);
1368 1371
1369 if (avccontext->flags & CODEC_FLAG_QSCALE) venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 100.; 1372 if (avccontext->flags & CODEC_FLAG_QSCALE) venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 100.;
1370 else venc->quality = 0.17; 1373 else venc->quality = 0.17;