From 9ec5287a36d8b5c8cd032a90064b4db93edcdae3 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 2 Feb 2004 21:18:54 +0000 Subject: [PATCH] gst/elements/gstfilesrc.c: set all the values on buffers that we can Original commit message from CVS: 2004-02-02 Benjamin Otte * gst/elements/gstfilesrc.c: (gst_filesrc_map_region), (gst_filesrc_get_read): set all the values on buffers that we can --- ChangeLog | 6 ++++++ gst/elements/gstfilesrc.c | 5 +++++ plugins/elements/gstfilesrc.c | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index b135ef1..df0e2c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-02-02 Benjamin Otte + + * gst/elements/gstfilesrc.c: (gst_filesrc_map_region), + (gst_filesrc_get_read): + set all the values on buffers that we can + 2004-02-02 David Schleef Change usage of isblah() to g_ascii_isblah() to be more locale diff --git a/gst/elements/gstfilesrc.c b/gst/elements/gstfilesrc.c index a9f9f7e..e366578 100644 --- a/gst/elements/gstfilesrc.c +++ b/gst/elements/gstfilesrc.c @@ -420,6 +420,7 @@ gst_filesrc_map_region (GstFileSrc *src, off_t offset, size_t size) GST_BUFFER_SIZE (buf) = size; GST_BUFFER_MAXSIZE (buf) = size; GST_BUFFER_OFFSET (buf) = offset; + GST_BUFFER_OFFSET_END (buf) = offset + size; GST_BUFFER_TIMESTAMP (buf) = GST_CLOCK_TIME_NONE; GST_BUFFER_PRIVATE (buf) = src; g_object_ref (src); @@ -647,6 +648,10 @@ gst_filesrc_get_read (GstFileSrc *src) return NULL; } + GST_BUFFER_SIZE (buf) = readsize; + GST_BUFFER_MAXSIZE (buf) = readsize; + GST_BUFFER_OFFSET (buf) = src->curoffset; + GST_BUFFER_OFFSET_END (buf) = src->curoffset + readsize; src->curoffset += readsize; return buf; diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index a9f9f7e..e366578 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -420,6 +420,7 @@ gst_filesrc_map_region (GstFileSrc *src, off_t offset, size_t size) GST_BUFFER_SIZE (buf) = size; GST_BUFFER_MAXSIZE (buf) = size; GST_BUFFER_OFFSET (buf) = offset; + GST_BUFFER_OFFSET_END (buf) = offset + size; GST_BUFFER_TIMESTAMP (buf) = GST_CLOCK_TIME_NONE; GST_BUFFER_PRIVATE (buf) = src; g_object_ref (src); @@ -647,6 +648,10 @@ gst_filesrc_get_read (GstFileSrc *src) return NULL; } + GST_BUFFER_SIZE (buf) = readsize; + GST_BUFFER_MAXSIZE (buf) = readsize; + GST_BUFFER_OFFSET (buf) = src->curoffset; + GST_BUFFER_OFFSET_END (buf) = src->curoffset + readsize; src->curoffset += readsize; return buf; -- 2.7.4