summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-09 12:23:04 +0200
committerwm4 <wm4@nowhere>2016-08-09 17:09:29 +0200
commitd81b5690dfb6c953e0e4b7ad0d822b5c6e065919 (patch)
tree2734fe4b5baa2134c529d58b6f23a5e3f70a3e9e /audio
parent8c2e299b84524b5f3f732afa32382bb6e70ca660 (diff)
downloadmpv-d81b5690dfb6c953e0e4b7ad0d822b5c6e065919.tar.bz2
mpv-d81b5690dfb6c953e0e4b7ad0d822b5c6e065919.tar.xz
af_lavcac3enc: allow passing options to libavcodec
Diffstat (limited to 'audio')
-rw-r--r--audio/filter/af_lavcac3enc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/audio/filter/af_lavcac3enc.c b/audio/filter/af_lavcac3enc.c
index 575ad03449..0a7c5d4440 100644
--- a/audio/filter/af_lavcac3enc.c
+++ b/audio/filter/af_lavcac3enc.c
@@ -33,6 +33,7 @@
#include "config.h"
+#include "common/av_common.h"
#include "common/common.h"
#include "af.h"
#include "audio/audio_buffer.h"
@@ -63,6 +64,7 @@ typedef struct af_ac3enc_s {
int cfg_bit_rate;
int cfg_min_channel_num;
char *cfg_encoder;
+ char **cfg_avopts;
} af_ac3enc_t;
// fmt carries the input format. Change it to the best next-possible format
@@ -392,6 +394,10 @@ static int af_open(struct af_instance* af){
MP_ERR(af, "Audio LAVC, couldn't allocate context!\n");
return AF_ERROR;
}
+
+ if (mp_set_avopts(af->log, s->lavc_actx, s->cfg_avopts) < 0)
+ return AF_ERROR;
+
// For this one, we require the decoder to expert lists of all supported
// parameters. (Not all decoders do that, but the ones we're interested
// in do.)
@@ -441,6 +447,7 @@ const struct af_info af_info_lavcac3enc = {
({"auto", 0}, {"default", 0})),
OPT_INTRANGE("minch", cfg_min_channel_num, 0, 2, 6),
OPT_STRING("encoder", cfg_encoder, 0),
+ OPT_KEYVALUELIST("o", cfg_avopts, 0),
{0}
},
};