diff options
author | Martin Storsjö <martin@martin.st> | 2011-02-04 13:04:18 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-06 22:31:45 +0300 |
commit | 42f97696aec6bab0f11704c4de439e5364522ab6 (patch) | |
tree | c5fe50d136d780bb677d27b3c597ca6697f0f44a /libavformat/movenchint.c | |
parent | 8cf2d3d3d71d14169183eaf34faad924120b53d6 (diff) |
Use avformat_free_context for cleaning up muxers
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b22dbb291d41e9fb038884bcebad2394c501cbaf)
Diffstat (limited to 'libavformat/movenchint.c')
-rw-r--r-- | libavformat/movenchint.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c index 6a9df076ce..10913dd904 100644 --- a/libavformat/movenchint.c +++ b/libavformat/movenchint.c @@ -81,17 +81,9 @@ fail: url_close_dyn_buf(track->rtp_ctx->pb, &buf); av_free(buf); } - 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]->codec->extradata); - av_free(track->rtp_ctx->streams[0]->codec); - av_free(track->rtp_ctx->streams[0]->info); - av_free(track->rtp_ctx->streams[0]); - } if (track->rtp_ctx) { - av_metadata_free(&track->rtp_ctx->metadata); - av_free(track->rtp_ctx->priv_data); - av_freep(&track->rtp_ctx); + avformat_free_context(track->rtp_ctx); + track->rtp_ctx = NULL; } av_freep(&track->enc); /* Set a default timescale, to avoid crashes in dump_format */ @@ -488,12 +480,6 @@ void ff_mov_close_hinting(MOVTrack *track) { url_close_dyn_buf(rtp_ctx->pb, &ptr); av_free(ptr); } - av_metadata_free(&rtp_ctx->streams[0]->metadata); - av_metadata_free(&rtp_ctx->metadata); - av_free(rtp_ctx->streams[0]->codec->extradata); - av_free(rtp_ctx->streams[0]->codec); - av_free(rtp_ctx->streams[0]->info); - av_free(rtp_ctx->streams[0]); - av_freep(&rtp_ctx); + avformat_free_context(rtp_ctx); } |