diff options
| author | dec05eba <dec05eba@protonmail.com> | 2026-08-08 04:11:11 +0200 |
|---|---|---|
| committer | dec05eba <dec05eba@protonmail.com> | 2026-08-08 04:11:11 +0200 |
| commit | 20740fe57962c9cbfb0cd6c2f1036da775c40c8b (patch) | |
| tree | a2f56f4f50ba36198d899da27a5327acd023e68f /src/recorder/recorder.c | |
| parent | 65c75169276be632ed8543a1f0c03d966f683b19 (diff) | |
Fix nvenc crash on shutdown. part 2
Diffstat (limited to 'src/recorder/recorder.c')
| -rw-r--r-- | src/recorder/recorder.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/recorder/recorder.c b/src/recorder/recorder.c index ca4dcea..29d36d8 100644 --- a/src/recorder/recorder.c +++ b/src/recorder/recorder.c @@ -914,17 +914,17 @@ void gsr_recorder_destroy(gsr_recorder *self, bool exiting) { if(self->video_frame) av_frame_free(&self->video_frame); + if(self->video_codec_context) + avcodec_free_context(&self->video_codec_context); + if(self->video_encoder) - gsr_video_encoder_destroy(self->video_encoder, self->video_codec_context); + gsr_video_encoder_destroy(self->video_encoder, NULL); if(self->encoder_initialized) gsr_encoder_deinit(&self->encoder, exiting); gsr_video_sources_deinit(&self->video_sources_data); - if(self->video_codec_context) - avcodec_free_context(&self->video_codec_context); - if(self->av_format_context) { if(self->av_format_context->pb && !(self->av_format_context->oformat->flags & AVFMT_NOFILE)) avio_close(self->av_format_context->pb); |
