avformat/rtpenc_chain: Use avio_closep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-08 20:08:24 +01:00
parent e360d030b3
commit f9ddaa35c7

View File

@ -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);