nvenc: Stop bitstream thread in ::stop()

Otherwise we are likely to crash if EOS didn't happen yet.

https://bugzilla.gnome.org/show_bug.cgi?id=781410
This commit is contained in:
Ole André Vadla Ravnås 2017-04-17 19:25:49 +02:00 committed by Tim-Philipp Müller
parent 70ac63a97c
commit cb28314013

View file

@ -222,6 +222,7 @@ static void gst_nv_base_enc_get_property (GObject * object, guint prop_id,
static void gst_nv_base_enc_finalize (GObject * obj);
static GstCaps *gst_nv_base_enc_getcaps (GstVideoEncoder * enc,
GstCaps * filter);
static gboolean gst_nv_base_enc_stop_bitstream_thread (GstNvBaseEnc * nvenc);
static void
gst_nv_base_enc_class_init (GstNvBaseEncClass * klass)
@ -505,6 +506,8 @@ gst_nv_base_enc_stop (GstVideoEncoder * enc)
{
GstNvBaseEnc *nvenc = GST_NV_BASE_ENC (enc);
gst_nv_base_enc_stop_bitstream_thread (nvenc);
gst_nv_base_enc_free_buffers (nvenc);
if (nvenc->bitstream_pool) {