aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-03-30 22:15:50 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-03-31 01:11:16 +0200
commit729d821fd864a0568f4068e64d3a70faa23b9309 (patch)
tree7183f4b93560b6944535ce2d9dd30877385ec1cd
parent12789d96361ed8e9804bfbb9db31ea4110e75c58 (diff)
downloadffmpeg-729d821fd864a0568f4068e64d3a70faa23b9309.tar.gz
libmp3lame: allow joint stereo to be disabled
-rw-r--r--libavcodec/libmp3lame.c4
-rw-r--r--libavcodec/version.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index ee76ff8812..6da68ad3b7 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -48,6 +48,7 @@ typedef struct LAMEContext {
int buffer_index;
int buffer_size;
int reservoir;
+ int joint_stereo;
float *samples_flt[2];
AudioFrameQueue afq;
AVFloatDSPContext fdsp;
@@ -96,7 +97,7 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx)
return AVERROR(ENOMEM);
lame_set_num_channels(s->gfp, avctx->channels);
- lame_set_mode(s->gfp, avctx->channels > 1 ? JOINT_STEREO : MONO);
+ lame_set_mode(s->gfp, avctx->channels > 1 ? s->joint_stereo ? JOINT_STEREO : STEREO : MONO);
/* sample rate */
lame_set_in_samplerate (s->gfp, avctx->sample_rate);
@@ -260,6 +261,7 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
#define AE AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = {
{ "reservoir", "Use bit reservoir.", OFFSET(reservoir), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, AE },
+ { "joint_stereo", "Use joint stereo.", OFFSET(joint_stereo), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, AE },
{ NULL },
};
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 3b1f65bd77..faf85b3348 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MINOR 41
-#define LIBAVCODEC_VERSION_MICRO 0
+#define LIBAVCODEC_VERSION_MICRO 1
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \