diff options
author | Seungha Yang <seungha.yang@navercorp.com> | 2019-03-08 13:43:15 +0900 |
---|---|---|
committer | Seungha Yang <seungha.yang@navercorp.com> | 2019-03-10 13:58:42 +0900 |
commit | 01a402e4ec3239f84756b290dc60e56bedb0c79f (patch) | |
tree | 9891e7606d460e34e4ffbb6706ef83b0879db473 | |
parent | 74848770a501c8663f80b177569510c0096f1915 (diff) | |
download | gstreamer-plugins-bad-01a402e4ec3239f84756b290dc60e56bedb0c79f.tar.gz |
nvenc: More clean up on stop for encoder to be reusable
Encoder will not configure internal pool again if input_state exist
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/912
-rw-r--r-- | sys/nvenc/gstnvbaseenc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/nvenc/gstnvbaseenc.c b/sys/nvenc/gstnvbaseenc.c index 3d991bafb..4749c477a 100644 --- a/sys/nvenc/gstnvbaseenc.c +++ b/sys/nvenc/gstnvbaseenc.c @@ -513,6 +513,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; |