kmssink: keep last rendered buffer in memory

https://bugzilla.gnome.org/show_bug.cgi?id=761059
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-03-04 16:53:58 +01:00
parent b29f7d048c
commit 7d06cf3297
2 changed files with 4 additions and 0 deletions

View file

@ -482,6 +482,7 @@ gst_kms_sink_stop (GstBaseSink * bsink)
self = GST_KMS_SINK (bsink); self = GST_KMS_SINK (bsink);
gst_buffer_replace (&self->last_buffer, NULL);
gst_caps_replace (&self->allowed_caps, NULL); gst_caps_replace (&self->allowed_caps, NULL);
gst_object_replace ((GstObject **) & self->pool, NULL); gst_object_replace ((GstObject **) & self->pool, NULL);
gst_object_replace ((GstObject **) & self->allocator, 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)) if (!gst_kms_sink_sync (self))
goto bail; goto bail;
gst_buffer_replace (&self->last_buffer, buffer);
res = GST_FLOW_OK; res = GST_FLOW_OK;
bail: bail:

View file

@ -65,6 +65,7 @@ struct _GstKMSSink {
GstCaps *allowed_caps; GstCaps *allowed_caps;
GstBufferPool *pool; GstBufferPool *pool;
GstAllocator *allocator; GstAllocator *allocator;
GstBuffer *last_buffer;
gchar *devname; gchar *devname;