summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-02-22 06:33:49 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-02-22 06:33:49 +0000
commitebdf0b8bd0e14dfbdfba0edd73a285e3a93f0aa8 (patch)
tree0c5ccc78cc30495919a0ed5e6742430ce7ff3bf6
parent9ab72bf599f25e4b26034611faf5b8c78b072170 (diff)
downloadgstreamer-plugins-bad-ebdf0b8bd0e14dfbdfba0edd73a285e3a93f0aa8.tar.gz
ext/mythtv/gstmythtvsrc.c: Don't allocate and copy the data to a new place but instead put the data from gmyth (which...
Original commit message from CVS: * ext/mythtv/gstmythtvsrc.c: (gst_mythtv_src_create): Don't allocate and copy the data to a new place but instead put the data from gmyth (which we own) into the buffers that are passed downstream.
-rw-r--r--ChangeLog7
-rw-r--r--ext/mythtv/gstmythtvsrc.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 963d780ec..19cbb0e16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2008-02-22 Sebastian Dröge <slomo@circular-chaos.org>
+ * ext/mythtv/gstmythtvsrc.c: (gst_mythtv_src_create):
+ Don't allocate and copy the data to a new place but instead
+ put the data from gmyth (which we own) into the buffers that
+ are passed downstream.
+
+2008-02-22 Sebastian Dröge <slomo@circular-chaos.org>
+
* ext/timidity/gstwildmidi.c:
If WILDMIDI_CFG is not defined, define it to the default
timidity configure file.
diff --git a/ext/mythtv/gstmythtvsrc.c b/ext/mythtv/gstmythtvsrc.c
index 0650e077f..a136c272e 100644
--- a/ext/mythtv/gstmythtvsrc.c
+++ b/ext/mythtv/gstmythtvsrc.c
@@ -405,10 +405,8 @@ gst_mythtv_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
*outbuf = gst_buffer_new ();
GST_BUFFER_SIZE (*outbuf) = buffer->len;
- GST_BUFFER_MALLOCDATA (*outbuf) = g_malloc0 (GST_BUFFER_SIZE (*outbuf));
+ GST_BUFFER_MALLOCDATA (*outbuf) = buffer->data;
GST_BUFFER_DATA (*outbuf) = GST_BUFFER_MALLOCDATA (*outbuf);
- g_memmove (GST_BUFFER_DATA ((*outbuf)), buffer->data,
- GST_BUFFER_SIZE (*outbuf));
GST_BUFFER_OFFSET (*outbuf) = src->read_offset;
GST_BUFFER_OFFSET_END (*outbuf) =
src->read_offset + GST_BUFFER_SIZE (*outbuf);
@@ -416,7 +414,7 @@ gst_mythtv_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
src->read_offset += GST_BUFFER_SIZE (*outbuf);
src->bytes_read += GST_BUFFER_SIZE (*outbuf);
- g_byte_array_free (buffer, TRUE);
+ g_byte_array_free (buffer, FALSE);
if (result == GMYTH_FILE_READ_NEXT_PROG_CHAIN) {
GstPad *peer;