mirror of
https://github.com/panda3d/panda3d.git
synced 2026-02-16 12:19:27 -06:00
ffmpeg: Fix crash cleaning up audio/video context
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user