summaryrefslogtreecommitdiff
path: root/libavcodec/libtwolame.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-21 16:57:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-21 17:05:09 +0200
commit5ab51f75358360c7a9389fb3157efb919ff0e656 (patch)
treecd8d3085ee5f45ac097c0120ce631722b0b9c577 /libavcodec/libtwolame.c
parenta2de7b1bd5045bc244ddebbf81f353f03dff2a9b (diff)
avcodec/libtwolame: fix encoding lsf with defaults
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libtwolame.c')
-rw-r--r--libavcodec/libtwolame.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/libtwolame.c b/libavcodec/libtwolame.c
index 542abbc32a..e26454bb84 100644
--- a/libavcodec/libtwolame.c
+++ b/libavcodec/libtwolame.c
@@ -77,6 +77,10 @@ static av_cold int twolame_encode_init(AVCodecContext *avctx)
twolame_set_num_channels(s->glopts, avctx->channels);
twolame_set_in_samplerate(s->glopts, avctx->sample_rate);
twolame_set_out_samplerate(s->glopts, avctx->sample_rate);
+
+ if (!avctx->bit_rate)
+ avctx->bit_rate = avctx->sample_rate < 28000 ? 160000 : 384000;
+
if (avctx->flags & CODEC_FLAG_QSCALE || !avctx->bit_rate) {
twolame_set_VBR(s->glopts, TRUE);
twolame_set_VBR_level(s->glopts,
@@ -190,7 +194,7 @@ static const AVClass twolame_class = {
};
static const AVCodecDefault twolame_defaults[] = {
- { "b", "384000" },
+ { "b", "0" },
{ NULL },
};