summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2003-10-28 16:01:26 +0000
committerBenjamin Otte <otte@gnome.org>2003-10-28 16:01:26 +0000
commitf7b9b1773ef18474fef314115f03a6a0077d6234 (patch)
treec6ee02ec4dd4f02d1c82816338e52f9c56fecf05
parent9bd630797ff435a8e332fc8e90b3318084ed450b (diff)
downloadgstreamer-TYPEFIND.tar.gz
filesrc needs to be reffed by buffers that use its mmaped data directlyTYPEFIND
Original commit message from CVS: filesrc needs to be reffed by buffers that use its mmaped data directly
-rw-r--r--gst/elements/gstfilesrc.c2
-rw-r--r--plugins/elements/gstfilesrc.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/gst/elements/gstfilesrc.c b/gst/elements/gstfilesrc.c
index 96589e1718..d3288d6b36 100644
--- a/gst/elements/gstfilesrc.c
+++ b/gst/elements/gstfilesrc.c
@@ -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);
diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c
index 96589e1718..d3288d6b36 100644
--- a/plugins/elements/gstfilesrc.c
+++ b/plugins/elements/gstfilesrc.c
@@ -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);