mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
filesrc needs to be reffed by buffers that use its mmaped data directly
Original commit message from CVS: filesrc needs to be reffed by buffers that use its mmaped data directly
This commit is contained in:
parent
9bd630797f
commit
f7b9b1773e
2 changed files with 4 additions and 0 deletions
|
@ -370,6 +370,7 @@ gst_filesrc_free_parent_mmap (GstBuffer *buf)
|
|||
|
||||
GST_BUFFER_DATA (buf) = NULL;
|
||||
|
||||
g_object_unref (src);
|
||||
gst_buffer_default_free (buf);
|
||||
}
|
||||
|
||||
|
@ -414,6 +415,7 @@ gst_filesrc_map_region (GstFileSrc *src, off_t offset, size_t size)
|
|||
GST_BUFFER_OFFSET (buf) = offset;
|
||||
GST_BUFFER_TIMESTAMP (buf) = GST_CLOCK_TIME_NONE;
|
||||
GST_BUFFER_POOL_PRIVATE (buf) = src;
|
||||
g_object_ref (src);
|
||||
GST_BUFFER_FREE_FUNC (buf) = (GstDataFreeFunction) gst_filesrc_free_parent_mmap;
|
||||
|
||||
g_mutex_lock (src->map_regions_lock);
|
||||
|
|
|
@ -370,6 +370,7 @@ gst_filesrc_free_parent_mmap (GstBuffer *buf)
|
|||
|
||||
GST_BUFFER_DATA (buf) = NULL;
|
||||
|
||||
g_object_unref (src);
|
||||
gst_buffer_default_free (buf);
|
||||
}
|
||||
|
||||
|
@ -414,6 +415,7 @@ gst_filesrc_map_region (GstFileSrc *src, off_t offset, size_t size)
|
|||
GST_BUFFER_OFFSET (buf) = offset;
|
||||
GST_BUFFER_TIMESTAMP (buf) = GST_CLOCK_TIME_NONE;
|
||||
GST_BUFFER_POOL_PRIVATE (buf) = src;
|
||||
g_object_ref (src);
|
||||
GST_BUFFER_FREE_FUNC (buf) = (GstDataFreeFunction) gst_filesrc_free_parent_mmap;
|
||||
|
||||
g_mutex_lock (src->map_regions_lock);
|
||||
|
|
Loading…
Reference in a new issue