avformat/rtsp: 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 816577716b
commit e360d030b3
1 changed files with 1 additions and 1 deletions

View File

@ -684,7 +684,7 @@ void ff_rtsp_undo_setup(AVFormatContext *s, int send_packets)
avio_close_dyn_buf(rtpctx->pb, &ptr);
av_free(ptr);
} else {
avio_close(rtpctx->pb);
avio_closep(&rtpctx->pb);
}
avformat_free_context(rtpctx);
} else if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RDT)