]> git.sesse.net Git - ffmpeg/commitdiff
avformat/rtsp: Use avio_closep() to avoid leaving stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 8 Jan 2015 19:08:24 +0000 (20:08 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 8 Jan 2015 19:19:20 +0000 (20:19 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rtsp.c

index 7276b79407f1f6d3f0fb2871c3e9adfde510c8dc..c9ffba468a42a9b12cac92c62b1339278c5d58ad 100644 (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)