aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/recorder
diff options
context:
space:
mode:
Diffstat (limited to 'src/recorder')
-rw-r--r--src/recorder/recorder.c8
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);