提交 5e768990 编写于 作者: C Christoph Hohmann

deps/libff: Fix that inputs are not closed when a demuxer is freed

avformat_free_context() only frees the memory used by an AVFormatContext
but it does not close the opened media file. This causes a leaked file
descriptor every time a media source frees a demuxer. Using
avformat_close_input() instead frees the context and closes the media
file.
上级 b9e4ff1f
......@@ -94,7 +94,7 @@ void ff_demuxer_free(struct ff_demuxer *demuxer)
ff_decoder_free(demuxer->video_decoder);
if (demuxer->format_context)
avformat_free_context(demuxer->format_context);
avformat_close_input(&demuxer->format_context);
av_free(demuxer);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册