diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c index b2aa12471f..302c14c11a 100644 --- a/libavformat/rtpenc_chain.c +++ b/libavformat/rtpenc_chain.c @@ -89,7 +89,7 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s, if (ret) { if (handle && rtpctx->pb) { - avio_close(rtpctx->pb); + avio_closep(&rtpctx->pb); } else if (rtpctx->pb) { uint8_t *ptr; avio_close_dyn_buf(rtpctx->pb, &ptr);