mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
ffmpeg: Fix crash cleaning up audio/video context
This commit is contained in:
parent
5dc5d009c1
commit
90fb31ac21
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user