You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
Revert "avformat/utils: Close codec context since it is allocated by avformat_new_stream in refrence to ticket 2716"
This causes a race condition with VLC. Its plausible that other
applications also would have races with it and its just fixing a memleak when
the user application forgets to free the codec. It causes more
problems than it solves in its current form, thus the revert.
Better solutions are welcome
This reverts commit 0f229f9b91
.
This commit is contained in:
@ -3178,9 +3178,6 @@ void ff_free_stream(AVFormatContext *s, AVStream *st){
|
|||||||
av_assert0(s->nb_streams>0);
|
av_assert0(s->nb_streams>0);
|
||||||
av_assert0(s->streams[ s->nb_streams-1 ] == st);
|
av_assert0(s->streams[ s->nb_streams-1 ] == st);
|
||||||
|
|
||||||
if (st->codec) {
|
|
||||||
avcodec_close(st->codec);
|
|
||||||
}
|
|
||||||
if (st->parser) {
|
if (st->parser) {
|
||||||
av_parser_close(st->parser);
|
av_parser_close(st->parser);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user