Commit e360d030 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 81657771
...@@ -684,7 +684,7 @@ void ff_rtsp_undo_setup(AVFormatContext *s, int send_packets) ...@@ -684,7 +684,7 @@ void ff_rtsp_undo_setup(AVFormatContext *s, int send_packets)
avio_close_dyn_buf(rtpctx->pb, &ptr); avio_close_dyn_buf(rtpctx->pb, &ptr);
av_free(ptr); av_free(ptr);
} else { } else {
avio_close(rtpctx->pb); avio_closep(&rtpctx->pb);
} }
avformat_free_context(rtpctx); avformat_free_context(rtpctx);
} else if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RDT) } else if (CONFIG_RTPDEC && rt->transport == RTSP_TRANSPORT_RDT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment