Commit 41525543 authored by Seungha Yang's avatar Seungha Yang 🐑 Committed by Tim-Philipp Müller

nvenc: More clean up on stop for encoder to be reusable

Encoder will not configure internal pool again if input_state exist

Fixes #912
parent 6f1ff1af
...@@ -527,6 +527,11 @@ gst_nv_base_enc_stop (GstVideoEncoder * enc) ...@@ -527,6 +527,11 @@ gst_nv_base_enc_stop (GstVideoEncoder * enc)
gst_nv_base_enc_free_buffers (nvenc); 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) { if (nvenc->bitstream_pool) {
g_async_queue_unref (nvenc->bitstream_pool); g_async_queue_unref (nvenc->bitstream_pool);
nvenc->bitstream_pool = NULL; nvenc->bitstream_pool = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment