media_utils: fix segfault when stopping a recording

This commit is contained in:
Megamouse 2024-01-12 18:34:39 +01:00
parent 17aeefe1b0
commit f7fa5aab70
3 changed files with 4 additions and 19 deletions

View file

@ -371,7 +371,6 @@ public:
}
if (ctx)
{
avcodec_close(ctx);
avcodec_free_context(&ctx);
}
if (io_buf)
@ -382,7 +381,6 @@ public:
{
if (fmt->pb) av_freep(&fmt->pb);
avformat_close_input(&fmt);
avformat_free_context(fmt);
}
}

View file

@ -280,7 +280,6 @@ struct vdec_context final
~vdec_context()
{
avcodec_close(ctx);
avcodec_free_context(&ctx);
sws_freeContext(sws);
}