summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3512ad3)
We know the buffer will stay valid and we will also not
modify the buffer, we just want to send out the data.
size = 0;
for (i = 0; i < n_mem; i++) {
size = 0;
for (i = 0; i < n_mem; i++) {
- mem = gst_buffer_get_memory (buffer, i);
+ mem = gst_buffer_peek_memory (buffer, i);
gst_memory_map (mem, &map[i], GST_MAP_READ);
vec[i].buffer = map[i].data;
gst_memory_map (mem, &map[i], GST_MAP_READ);
vec[i].buffer = map[i].data;
g_mutex_unlock (&sink->client_lock);
/* unmap all memory again */
g_mutex_unlock (&sink->client_lock);
/* unmap all memory again */
- for (i = 0; i < n_mem; i++) {
+ for (i = 0; i < n_mem; i++)
gst_memory_unmap (map[i].memory, &map[i]);
gst_memory_unmap (map[i].memory, &map[i]);
- gst_memory_unref (map[i].memory);
- }
GST_LOG_OBJECT (sink, "sent %" G_GSIZE_FORMAT " bytes to %d (of %d) clients",
size, num, no_clients);
GST_LOG_OBJECT (sink, "sent %" G_GSIZE_FORMAT " bytes to %d (of %d) clients",
size, num, no_clients);
g_clear_error (&err);
/* unmap all memory */
g_clear_error (&err);
/* unmap all memory */
- for (i = 0; i < n_mem; i++) {
+ for (i = 0; i < n_mem; i++)
gst_memory_unmap (map[i].memory, &map[i]);
gst_memory_unmap (map[i].memory, &map[i]);
- gst_memory_unref (map[i].memory);
- }
return GST_FLOW_FLUSHING;
}
return GST_FLOW_FLUSHING;
}