mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +00:00
shmpipe: Ref client shmarea when a buffer is received in it
This commit is contained in:
parent
68c9ed6e5c
commit
007a26ac08
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue