diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c index ec75e2496f..11f0185f2b 100644 --- a/sys/kms/gstkmssink.c +++ b/sys/kms/gstkmssink.c @@ -482,6 +482,7 @@ gst_kms_sink_stop (GstBaseSink * bsink) self = GST_KMS_SINK (bsink); + gst_buffer_replace (&self->last_buffer, NULL); gst_caps_replace (&self->allowed_caps, NULL); gst_object_replace ((GstObject **) & self->pool, NULL); gst_object_replace ((GstObject **) & self->allocator, NULL); @@ -1099,6 +1100,8 @@ gst_kms_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf) if (!gst_kms_sink_sync (self)) goto bail; + gst_buffer_replace (&self->last_buffer, buffer); + res = GST_FLOW_OK; bail: diff --git a/sys/kms/gstkmssink.h b/sys/kms/gstkmssink.h index 1f9c0e1fb0..317afbc4ee 100644 --- a/sys/kms/gstkmssink.h +++ b/sys/kms/gstkmssink.h @@ -65,6 +65,7 @@ struct _GstKMSSink { GstCaps *allowed_caps; GstBufferPool *pool; GstAllocator *allocator; + GstBuffer *last_buffer; gchar *devname;