Use avformat_free_context for cleaning up muxers
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b22dbb291d
)
This commit is contained in:

committed by
Michael Niedermayer

parent
8cf2d3d3d7
commit
42f97696ae
@@ -66,11 +66,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]->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);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user