vtenc: flush encoder on stop
authorNicola Murino <nicola.murino@gmail.com>
Mon, 23 Oct 2017 08:40:43 +0000 (10:40 +0200)
committerMatthew Waters <matthew@centricular.com>
Mon, 30 Oct 2017 06:16:29 +0000 (17:16 +1100)
https://bugzilla.gnome.org/show_bug.cgi?id=787311

sys/applemedia/vtenc.c

index 32d07a8c9af8f6d2b88926b1a7fc1e567938c251..61b8ffc27e3db3c0c7d921aeb0b1e1bfbbeff60c 100644 (file)
@@ -560,6 +560,10 @@ gst_vtenc_stop (GstVideoEncoder * enc)
 {
   GstVTEnc *self = GST_VTENC_CAST (enc);
 
+  GST_VIDEO_ENCODER_STREAM_LOCK (self);
+  gst_vtenc_flush (self);
+  GST_VIDEO_ENCODER_STREAM_UNLOCK (self);
+
   GST_OBJECT_LOCK (self);
   gst_vtenc_destroy_session (self, &self->session);
   GST_OBJECT_UNLOCK (self);