summaryrefslogtreecommitdiffstats
path: root/libavcodec/vorbisenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/vorbisenc.c')
-rw-r--r--libavcodec/vorbisenc.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c
index b0e0e68..b88791f 100644
--- a/libavcodec/vorbisenc.c
+++ b/libavcodec/vorbisenc.c
@@ -1,20 +1,20 @@
/*
* copyright (c) 2006 Oded Shimon <ods15@ods15.dyndns.org>
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -1016,7 +1016,6 @@ static int apply_window_and_mdct(vorbis_enc_context *venc, const signed short *a
return 1;
}
-
static int vorbis_encode_frame(AVCodecContext *avccontext, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
@@ -1032,10 +1031,8 @@ static int vorbis_encode_frame(AVCodecContext *avccontext, AVPacket *avpkt,
return 0;
samples = 1 << (venc->log2_blocksize[0] - 1);
- if ((ret = ff_alloc_packet(avpkt, 8192))) {
- av_log(avccontext, AV_LOG_ERROR, "Error getting output packet\n");
+ if ((ret = ff_alloc_packet2(avccontext, avpkt, 8192)))
return ret;
- }
init_put_bits(&pb, avpkt->data, avpkt->size);
@@ -1173,7 +1170,7 @@ static av_cold int vorbis_encode_init(AVCodecContext *avccontext)
int ret;
if (avccontext->channels != 2) {
- av_log(avccontext, AV_LOG_ERROR, "Current Libav Vorbis encoder only supports 2 channels.\n");
+ av_log(avccontext, AV_LOG_ERROR, "Current FFmpeg Vorbis encoder only supports 2 channels.\n");
return -1;
}
@@ -1184,7 +1181,7 @@ static av_cold int vorbis_encode_init(AVCodecContext *avccontext)
if (avccontext->flags & CODEC_FLAG_QSCALE)
venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA;
else
- venc->quality = 3.0;
+ venc->quality = 8;
venc->quality *= venc->quality;
if ((ret = put_main_header(venc, (uint8_t**)&avccontext->extradata)) < 0)
OpenPOWER on IntegriCloud