From 65c75169276be632ed8543a1f0c03d966f683b19 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 8 Aug 2026 04:02:34 +0200 Subject: Fix nvenc crash on shutdown --- src/recorder/recorder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/recorder/recorder.c b/src/recorder/recorder.c index 901077c..ca4dcea 100644 --- a/src/recorder/recorder.c +++ b/src/recorder/recorder.c @@ -911,6 +911,9 @@ void gsr_recorder_destroy(gsr_recorder *self, bool exiting) { if(self->color_conversion_initialized) gsr_color_conversion_deinit(&self->color_conversion); + if(self->video_frame) + av_frame_free(&self->video_frame); + if(self->video_encoder) gsr_video_encoder_destroy(self->video_encoder, self->video_codec_context); @@ -919,9 +922,6 @@ void gsr_recorder_destroy(gsr_recorder *self, bool exiting) { gsr_video_sources_deinit(&self->video_sources_data); - if(self->video_frame) - av_frame_free(&self->video_frame); - if(self->video_codec_context) avcodec_free_context(&self->video_codec_context); -- cgit v1.2.3