avformat/rtpenc_chain: use the proper function to free AVFormatContext

Fixes ticket #7075

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2018-03-26 00:52:39 -03:00
parent db77230894
commit 3eff98c927

View File

@ -101,7 +101,7 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
return 0;
fail:
av_free(rtpctx);
avformat_free_context(rtpctx);
if (handle)
ffurl_close(handle);
return ret;