ffmpeg: Fix crash cleaning up audio/video context

This commit is contained in:
rdb 2020-12-28 16:23:04 +01:00
parent 5dc5d009c1
commit 90fb31ac21
2 changed files with 2 additions and 2 deletions

View File

@ -224,7 +224,7 @@ cleanup() {
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 52, 0)
avcodec_free_context(&_audio_ctx);
#else
delete _audio_ctx;
av_free(_audio_ctx);
#endif
}
_audio_ctx = nullptr;

View File

@ -607,7 +607,7 @@ close_stream() {
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 52, 0)
avcodec_free_context(&_video_ctx);
#else
delete _video_ctx;
av_free(_video_ctx);
#endif
}
_video_ctx = nullptr;