From b22dbb291d41e9fb038884bcebad2394c501cbaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 4 Feb 2011 12:04:18 +0200 Subject: Use avformat_free_context for cleaning up muxers Signed-off-by: Ronald S. Bultje --- libavformat/rtsp.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'libavformat/rtsp.c') diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index d31e8ee..d3e88e9 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -498,13 +498,7 @@ void ff_rtsp_undo_setup(AVFormatContext *s) } else { url_fclose(rtpctx->pb); } - av_metadata_free(&rtpctx->streams[0]->metadata); - av_metadata_free(&rtpctx->metadata); - av_free(rtpctx->streams[0]->codec->extradata); - av_free(rtpctx->streams[0]->codec); - av_free(rtpctx->streams[0]->info); - av_free(rtpctx->streams[0]); - av_free(rtpctx); + avformat_free_context(rtpctx); } else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC) ff_rdt_parse_close(rtsp_st->transport_priv); else if (CONFIG_RTPDEC) -- cgit v1.1