diff --git a/sys/nvenc/gstnvbaseenc.c b/sys/nvenc/gstnvbaseenc.c index 5cf77141b517521216df24d7fa7708d2ad195f1b..8bc446eb7f249c198e8c4ea89608e158d47ed29a 100644 --- a/sys/nvenc/gstnvbaseenc.c +++ b/sys/nvenc/gstnvbaseenc.c @@ -527,6 +527,11 @@ gst_nv_base_enc_stop (GstVideoEncoder * enc) gst_nv_base_enc_free_buffers (nvenc); + if (nvenc->input_state) { + gst_video_codec_state_unref (nvenc->input_state); + nvenc->input_state = NULL; + } + if (nvenc->bitstream_pool) { g_async_queue_unref (nvenc->bitstream_pool); nvenc->bitstream_pool = NULL;