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
This commit is contained in:
Seungha Yang 2019-03-08 13:43:15 +09:00
parent 74848770a5
commit 01a402e4ec

View file

@ -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;