aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-02-02 10:57:26 +0200
committerLuca Barbato <lu_zero@gentoo.org>2011-02-03 01:03:31 +0100
commitce41c51b0c71c87f623914ba0786aef325d818fe (patch)
tree78b84191c0e7ae372a842b36008033e38bf73fc9 /libavformat
parentd9c0510e22821baa364306d867ffac45da0620c8 (diff)
downloadffmpeg-ce41c51b0c71c87f623914ba0786aef325d818fe.tar.gz
Free AVStream->info in chained muxers
This fixes memory leaks in the RTSP muxer and RTP hinting in the mov muxer present since SVN rev 25418. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenchint.c2
-rw-r--r--libavformat/rtpenc_chain.c1
-rw-r--r--libavformat/rtsp.c1
3 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c
index 2ebe8b808f..2aa0f17d54 100644
--- a/libavformat/movenchint.c
+++ b/libavformat/movenchint.c
@@ -86,6 +86,7 @@ fail:
}
if (track->rtp_ctx && track->rtp_ctx->streams[0]) {
av_metadata_free(&track->rtp_ctx->streams[0]->metadata);
+ av_free(track->rtp_ctx->streams[0]->info);
av_free(track->rtp_ctx->streams[0]);
}
if (track->rtp_ctx) {
@@ -490,6 +491,7 @@ void ff_mov_close_hinting(MOVTrack *track) {
}
av_metadata_free(&rtp_ctx->streams[0]->metadata);
av_metadata_free(&rtp_ctx->metadata);
+ av_free(rtp_ctx->streams[0]->info);
av_free(rtp_ctx->streams[0]);
av_freep(&rtp_ctx);
}
diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c
index 10d9df2065..19ea98f643 100644
--- a/libavformat/rtpenc_chain.c
+++ b/libavformat/rtpenc_chain.c
@@ -70,6 +70,7 @@ AVFormatContext *ff_rtp_chain_mux_open(AVFormatContext *s, AVStream *st,
url_close_dyn_buf(rtpctx->pb, &ptr);
av_free(ptr);
}
+ av_free(rtpctx->streams[0]->info);
av_free(rtpctx->streams[0]);
av_free(rtpctx);
return NULL;
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index e1d750324d..52c686c3e5 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -500,6 +500,7 @@ void ff_rtsp_undo_setup(AVFormatContext *s)
}
av_metadata_free(&rtpctx->streams[0]->metadata);
av_metadata_free(&rtpctx->metadata);
+ av_free(rtpctx->streams[0]->info);
av_free(rtpctx->streams[0]);
av_free(rtpctx);
} else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC)