projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
777f8ab
)
theoradec: Avoid an unnecessary memory allocation in vorbiscomment handling.
author
Jan Schmidt
<thaytan@noraisin.net>
Fri, 13 Mar 2009 11:48:28 +0000
(11:48 +0000)
committer
Jan Schmidt
<thaytan@noraisin.net>
Fri, 13 Mar 2009 11:48:28 +0000
(11:48 +0000)
ext/theora/theoradec.c
patch
|
blob
|
history
diff --git
a/ext/theora/theoradec.c
b/ext/theora/theoradec.c
index
d02c64b
..
d9d8fcd
100644
(file)
--- 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,