[gst-cvs] gst-plugins-bad: shmpipe: Ref client shmarea when a buffer is received in it
Olivier Crête
tester at kemper.freedesktop.org
Thu Jun 3 12:28:15 PDT 2010
Module: gst-plugins-bad
Branch: master
Commit: 007a26ac08a9bd66e41dbb5133a2721845ff2bdb
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=007a26ac08a9bd66e41dbb5133a2721845ff2bdb
Author: Olivier Crête <olivier.crete at collabora.co.uk>
Date: Thu Jan 28 11:31:11 2010 +0200
shmpipe: Ref client shmarea when a buffer is received in it
---
gst/shm/shmpipe.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/gst/shm/shmpipe.c b/gst/shm/shmpipe.c
index 41aec24..c52b3d2 100644
--- a/gst/shm/shmpipe.c
+++ b/gst/shm/shmpipe.c
@@ -597,6 +597,7 @@ sp_client_recv (ShmPipe * self, char **buf)
for (area = self->shm_area; area; area = area->next) {
if (area->id == cb.area_id) {
*buf = area->shm_area + cb.payload.buffer.offset;
+ sp_shm_area_inc (area);
return cb.payload.buffer.size;
}
}
@@ -658,6 +659,8 @@ sp_client_recv_finish (ShmPipe * self, char *buf)
offset = buf - shm_area->shm_area;
+ sp_shm_area_dec (self, shm_area);
+
cb.payload.ack_buffer.offset = offset;
return send_command (self->main_socket, &cb, COMMAND_ACK_BUFFER,
self->shm_area->id);
More information about the Gstreamer-commits
mailing list