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:
Benjamin Otte 2003-10-28 16:01:26 +00:00
parent 9bd630797f
commit f7b9b1773e
2 changed files with 4 additions and 0 deletions

View file

@ -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);

View file

@ -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);