From fef04315a179e2e3e36aad1976a7efebcbbe6995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= Date: Wed, 3 Apr 2024 22:43:37 +0300 Subject: [PATCH] audio/ad_spdif: utilize defined freeing function for AVIOContext This has been around since FFmpeg/FFmpeg@b12e4d3bb8df994f042ff1216fb8de2b967aab9e from 2017. Thanks to @mkver for noticing this. --- audio/decode/ad_spdif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/decode/ad_spdif.c b/audio/decode/ad_spdif.c index fd11691326..893b8b9d55 100644 --- a/audio/decode/ad_spdif.c +++ b/audio/decode/ad_spdif.c @@ -89,7 +89,7 @@ static void destroy(struct mp_filter *da) av_write_trailer(lavf_ctx); if (lavf_ctx->pb) av_freep(&lavf_ctx->pb->buffer); - av_freep(&lavf_ctx->pb); + avio_context_free(&lavf_ctx->pb); avformat_free_context(lavf_ctx); spdif_ctx->lavf_ctx = NULL; }