summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio/decode/ad_spdif.c4
-rw-r--r--audio/decode/dec_audio.h1
-rw-r--r--player/audio.c1
3 files changed, 3 insertions, 3 deletions
diff --git a/audio/decode/ad_spdif.c b/audio/decode/ad_spdif.c
index 5e9dcf1c4f..dd0ef181af 100644
--- a/audio/decode/ad_spdif.c
+++ b/audio/decode/ad_spdif.c
@@ -41,6 +41,7 @@ struct spdifContext {
bool need_close;
bool use_dts_hd;
struct mp_audio fmt;
+ struct mp_audio_pool *pool;
};
static int write_packet(void *p, uint8_t *buf, int buf_size)
@@ -79,6 +80,7 @@ static int init(struct dec_audio *da, const char *decoder)
da->priv = spdif_ctx;
spdif_ctx->log = da->log;
spdif_ctx->use_dts_hd = da->opts->dtshd;
+ spdif_ctx->pool = mp_audio_pool_create(spdif_ctx);
if (strcmp(decoder, "dts-hd") == 0) {
decoder = "dts";
@@ -269,7 +271,7 @@ static int decode_packet(struct dec_audio *da, struct mp_audio **out)
return AD_ERR;
int samples = spdif_ctx->out_buffer_len / spdif_ctx->fmt.sstride;
- *out = mp_audio_pool_get(da->pool, &spdif_ctx->fmt, samples);
+ *out = mp_audio_pool_get(spdif_ctx->pool, &spdif_ctx->fmt, samples);
if (!*out)
return AD_ERR;
diff --git a/audio/decode/dec_audio.h b/audio/decode/dec_audio.h
index a8c66fa67e..17ce6b838f 100644
--- a/audio/decode/dec_audio.h
+++ b/audio/decode/dec_audio.h
@@ -36,7 +36,6 @@ struct dec_audio {
struct af_stream *afilter;
char *decoder_desc;
int init_retries;
- struct mp_audio_pool *pool;
struct mp_audio decode_format;
struct mp_audio *waiting; // used on format-change
// set by decoder
diff --git a/player/audio.c b/player/audio.c
index a7a5f727c7..d4b4d97f49 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -216,7 +216,6 @@ void reinit_audio_chain(struct MPContext *mpctx)
mpctx->d_audio->global = mpctx->global;
mpctx->d_audio->opts = opts;
mpctx->d_audio->header = sh;
- mpctx->d_audio->pool = mp_audio_pool_create(mpctx->d_audio);
mpctx->d_audio->afilter = af_new(mpctx->global);
mpctx->d_audio->afilter->replaygain_data = sh->codec->replaygain_data;
mpctx->d_audio->spdif_passthrough = true;