summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-10-31 18:40:05 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:18:07 +0200
commit6335de8621aa511cc85a60a97ffb3eddf0e35d8d (patch)
tree32d147f1156c25bff958b5eb5d06c01a9876e419
parent4c92247437e24460166558f499e132c1db39d4ef (diff)
downloadmpv-6335de8621aa511cc85a60a97ffb3eddf0e35d8d.tar.bz2
mpv-6335de8621aa511cc85a60a97ffb3eddf0e35d8d.tar.xz
libaf: add opts pointer to struct af_stream
-rw-r--r--libaf/af.h2
-rw-r--r--libmpcodecs/dec_audio.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/libaf/af.h b/libaf/af.h
index fe146906e9..98ae163bd1 100644
--- a/libaf/af.h
+++ b/libaf/af.h
@@ -23,6 +23,7 @@
#include "config.h"
+#include "options.h"
#include "af_format.h"
#include "control.h"
#include "cpudetect.h"
@@ -116,6 +117,7 @@ typedef struct af_stream
af_data_t output;
// Configuration for this stream
af_cfg_t cfg;
+ struct MPOpts *opts;
}af_stream_t;
/*********************************************
diff --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c
index 572e06a8a1..59abe398fb 100644
--- a/libmpcodecs/dec_audio.c
+++ b/libmpcodecs/dec_audio.c
@@ -328,8 +328,8 @@ int init_audio_filters(sh_audio_t *sh_audio, int in_samplerate,
{
af_stream_t *afs = sh_audio->afilter;
if (!afs) {
- afs = malloc(sizeof(af_stream_t));
- memset(afs, 0, sizeof(af_stream_t));
+ afs = calloc(1, sizeof(struct af_stream));
+ afs->opts = sh_audio->opts;
}
// input format: same as codec's output format:
afs->input.rate = in_samplerate;