summaryrefslogtreecommitdiffstats
path: root/audio/filter
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-07-16 12:51:48 +0200
committerwm4 <wm4@nowhere>2017-07-16 12:51:48 +0200
commitddd068491c9e8f7f77b6bba61269f867bdad204b (patch)
tree579de2a6443a52df12b1b4f813a5466eea7b7c74 /audio/filter
parent8e20ef4292719233d4b249ab714433e845cf6da2 (diff)
downloadmpv-ddd068491c9e8f7f77b6bba61269f867bdad204b.tar.bz2
mpv-ddd068491c9e8f7f77b6bba61269f867bdad204b.tar.xz
Replace remaining avcodec_close() calls
This API isn't deprecated (yet?), but it's still inferior and harder to use than avcodec_free_context(). Leave the call only in 1 case in af_lavcac3enc.c, where we apparently seriously close and reopen the encoder for whatever reason.
Diffstat (limited to 'audio/filter')
-rw-r--r--audio/filter/af_lavcac3enc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/audio/filter/af_lavcac3enc.c b/audio/filter/af_lavcac3enc.c
index d5c2d25ad2..33e685eddb 100644
--- a/audio/filter/af_lavcac3enc.c
+++ b/audio/filter/af_lavcac3enc.c
@@ -192,10 +192,7 @@ static void uninit(struct af_instance* af)
af_ac3enc_t *s = af->priv;
if (s) {
- if(s->lavc_actx) {
- avcodec_close(s->lavc_actx);
- av_free(s->lavc_actx);
- }
+ avcodec_free_context(&s->lavc_actx);
talloc_free(s->pending);
}
}