Mercurial > libavcodec.hg
comparison vorbis_enc.c @ 3896:46ab70354691 libavcodec
Original Commit: r97 | ods15 | 2006-09-30 23:32:19 +0300 (Sat, 30 Sep 2006) | 2 lines
don't assert fail for channels != 2, exit cleanly instead...
author | ods15 |
---|---|
date | Mon, 02 Oct 2006 06:09:10 +0000 |
parents | a9d7e965d24f |
children | 11caa885c449 |
comparison
equal
deleted
inserted
replaced
3895:a9d7e965d24f | 3896:46ab70354691 |
---|---|
1055 | 1055 |
1056 static int vorbis_encode_init(AVCodecContext * avccontext) | 1056 static int vorbis_encode_init(AVCodecContext * avccontext) |
1057 { | 1057 { |
1058 venc_context_t * venc = avccontext->priv_data; | 1058 venc_context_t * venc = avccontext->priv_data; |
1059 | 1059 |
1060 if (avccontext->channels != 2) return -1; | |
1061 | |
1060 create_vorbis_context(venc, avccontext); | 1062 create_vorbis_context(venc, avccontext); |
1061 | 1063 |
1062 if (avccontext->flags & CODEC_FLAG_QSCALE) venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 100.; | 1064 if (avccontext->flags & CODEC_FLAG_QSCALE) venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 100.; |
1063 else venc->quality = 0.17; | 1065 else venc->quality = 0.17; |
1064 //if(avccontext->cutoff > 0) cfreq = avccontext->cutoff / 1000.0; | 1066 //if(avccontext->cutoff > 0) cfreq = avccontext->cutoff / 1000.0; |