summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudioenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-08-20 16:20:27 +0200
committerAnton Khirnov <anton@khirnov.net>2011-08-22 07:17:38 +0200
commit0a593de38aa02d752eb44cfbe2d6cd4595a8c059 (patch)
treeea89f0a30bfbefcadf33a5bea47646bb5bc64fd2 /libavcodec/mpegaudioenc.c
parentfb42d156ed3a726f9a6c76025ea9e1237e6b4840 (diff)
downloadffmpeg-0a593de38aa02d752eb44cfbe2d6cd4595a8c059.tar.gz
mp2 encoder: make 128k the default bitrate.
Diffstat (limited to 'libavcodec/mpegaudioenc.c')
-rw-r--r--libavcodec/mpegaudioenc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
index 96c0fec445..1cadef7175 100644
--- a/libavcodec/mpegaudioenc.c
+++ b/libavcodec/mpegaudioenc.c
@@ -25,6 +25,7 @@
*/
#include "avcodec.h"
+#include "internal.h"
#include "put_bits.h"
#define FRAC_BITS 15 /* fractional bits for sb_samples and dct */
@@ -759,6 +760,11 @@ static av_cold int MPA_encode_close(AVCodecContext *avctx)
return 0;
}
+static const AVCodecDefault mp2_defaults[] = {
+ { "b", "128k" },
+ { NULL },
+};
+
AVCodec ff_mp2_encoder = {
.name = "mp2",
.type = AVMEDIA_TYPE_AUDIO,
@@ -770,4 +776,5 @@ AVCodec ff_mp2_encoder = {
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
.supported_samplerates= (const int[]){44100, 48000, 32000, 22050, 24000, 16000, 0},
.long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
+ .defaults = mp2_defaults,
};