diff options
Diffstat (limited to 'libavcodec/vorbisenc.c')
-rw-r--r-- | libavcodec/vorbisenc.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c index db0394a7dc..d685996277 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 */ @@ -1013,7 +1013,6 @@ static int apply_window_and_mdct(vorbis_enc_context *venc, return 1; } - static int vorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { @@ -1029,10 +1028,8 @@ static int vorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; samples = 1 << (venc->log2_blocksize[0] - 1); - if ((ret = ff_alloc_packet(avpkt, 8192))) { - av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n"); + if ((ret = ff_alloc_packet2(avctx, avpkt, 8192)) < 0) return ret; - } init_put_bits(&pb, avpkt->data, avpkt->size); @@ -1089,10 +1086,10 @@ static int vorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, avpkt->size = put_bits_count(&pb) >> 3; avpkt->duration = ff_samples_to_time_base(avctx, avctx->frame_size); - if (frame) + if (frame) { if (frame->pts != AV_NOPTS_VALUE) avpkt->pts = ff_samples_to_time_base(avctx, frame->pts); - else + } else avpkt->pts = venc->next_pts; if (avpkt->pts != AV_NOPTS_VALUE) venc->next_pts = avpkt->pts + avpkt->duration; @@ -1167,7 +1164,7 @@ static av_cold int vorbis_encode_init(AVCodecContext *avctx) int ret; if (avctx->channels != 2) { - av_log(avctx, AV_LOG_ERROR, "Current Libav Vorbis encoder only supports 2 channels.\n"); + av_log(avctx, AV_LOG_ERROR, "Current FFmpeg Vorbis encoder only supports 2 channels.\n"); return -1; } @@ -1178,7 +1175,7 @@ static av_cold int vorbis_encode_init(AVCodecContext *avctx) if (avctx->flags & CODEC_FLAG_QSCALE) venc->quality = avctx->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**)&avctx->extradata)) < 0) |