summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-10-19 13:18:25 +0200
committerwm4 <wm4@nowhere>2013-10-20 14:11:04 +0200
commit2aff8b7523f55a022a65b5404481eb58cd38b74d (patch)
treef3f989e013d9c80638ea14bea6e114ebb76cc2e3 /audio
parent5d9353f0d5d4bcd43322b8e175326cf9dc270d37 (diff)
downloadmpv-2aff8b7523f55a022a65b5404481eb58cd38b74d.tar.bz2
mpv-2aff8b7523f55a022a65b5404481eb58cd38b74d.tar.xz
af_lavrresample: actually free resampler
Fixes #304.
Diffstat (limited to 'audio')
-rw-r--r--audio/filter/af_lavrresample.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/filter/af_lavrresample.c b/audio/filter/af_lavrresample.c
index 52df9c2810..142eb35e6a 100644
--- a/audio/filter/af_lavrresample.c
+++ b/audio/filter/af_lavrresample.c
@@ -41,6 +41,7 @@
#define avresample_alloc_context swr_alloc
#define avresample_open swr_init
#define avresample_close(x) do { } while(0)
+#define avresample_free swr_free
#define avresample_available(x) 0
#define avresample_convert(ctx, out, out_planesize, out_samples, in, in_planesize, in_samples) \
swr_convert(ctx, out, out_samples, (const uint8_t**)(in), in_samples)
@@ -275,8 +276,10 @@ static void uninit(struct af_instance *af)
struct af_resample *s = af->priv;
if (s->avrctx)
avresample_close(s->avrctx);
+ avresample_free(&s->avrctx);
if (s->avrctx_out)
avresample_close(s->avrctx_out);
+ avresample_free(&s->avrctx_out);
}
static bool needs_reorder(int *reorder, int num_ch)