From: Ole André Vadla Ravnås Date: Mon, 17 Apr 2017 17:25:49 +0000 (+0200) Subject: nvenc: Stop bitstream thread in ::stop() X-Git-Tag: 1.19.3~507^2~5344 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb28314013ba7bc495368f97e359c893b640c8c6;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/sys/nvenc/gstnvbaseenc.c b/sys/nvenc/gstnvbaseenc.c index 4ec2426f37..980df67bd4 100644 --- a/sys/nvenc/gstnvbaseenc.c +++ b/sys/nvenc/gstnvbaseenc.c @@ -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) {