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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/102/head
Michael Niedermayer 10 years ago
parent 816577716b
commit e360d030b3
  1. 2
      libavformat/rtsp.c

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

Loading…
Cancel
Save