[gst-cvs] gst-plugins-base: theoradec: Avoid an unnecessary memory allocation in vorbiscomment handling.
Jan Schmidt
thaytan at kemper.freedesktop.org
Fri Mar 13 04:51:25 PDT 2009
Module: gst-plugins-base
Branch: master
Commit: e7d4250fc36683705807aa9eff74e43d875760b3
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=e7d4250fc36683705807aa9eff74e43d875760b3
Author: Jan Schmidt <thaytan at noraisin.net>
Date: Fri Mar 13 11:48:28 2009 +0000
theoradec: Avoid an unnecessary memory allocation in vorbiscomment handling.
---
ext/theora/theoradec.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c
index d02c64b..d9d8fcd 100644
--- a/ext/theora/theoradec.c
+++ b/ext/theora/theoradec.c
@@ -808,8 +808,9 @@ theora_handle_comment_packet (GstTheoraDec * dec, ogg_packet * packet)
GST_DEBUG_OBJECT (dec, "parsing comment packet");
- buf = gst_buffer_new_and_alloc (packet->bytes);
- memcpy (GST_BUFFER_DATA (buf), packet->packet, packet->bytes);
+ buf = gst_buffer_new ();
+ GST_BUFFER_SIZE (buf) = packet->bytes;
+ GST_BUFFER_DATA (buf) = packet->packet;
list =
gst_tag_list_from_vorbiscomment_buffer (buf, (guint8 *) "\201theora", 7,
More information about the Gstreamer-commits
mailing list