diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c index f768fb002e..e69fdc27cf 100644 --- a/libavformat/rtpenc_chain.c +++ b/libavformat/rtpenc_chain.c @@ -101,7 +101,7 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s, return 0; fail: - av_free(rtpctx); + avformat_free_context(rtpctx); if (handle) ffurl_close(handle); return ret;