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:
4a1cee3
)
collectpads: avoid multiple calls to gst_buffer_get_size() in macro
author
Tim-Philipp Müller
<tim@centricular.com>
Sat, 14 Mar 2015 16:00:47 +0000
(16:00 +0000)
committer
Tim-Philipp Müller
<tim@centricular.com>
Sat, 14 Mar 2015 16:02:03 +0000
(16:02 +0000)
libs/gst/base/gstcollectpads.c
patch
|
blob
|
history
diff --git
a/libs/gst/base/gstcollectpads.c
b/libs/gst/base/gstcollectpads.c
index
45e31d9
..
8866790
100644
(file)
--- a/
libs/gst/base/gstcollectpads.c
+++ b/
libs/gst/base/gstcollectpads.c
@@
-1131,7
+1131,7
@@
GstBuffer *
gst_collect_pads_read_buffer (GstCollectPads * pads, GstCollectData * data,
guint size)
{
- guint readsize;
+ guint readsize
, buf_size
;
GstBuffer *buffer;
g_return_val_if_fail (pads != NULL, NULL);
@@
-1142,7
+1142,8
@@
gst_collect_pads_read_buffer (GstCollectPads * pads, GstCollectData * data,
if ((buffer = data->buffer) == NULL)
return NULL;
- readsize = MIN (size, gst_buffer_get_size (buffer) - data->pos);
+ buf_size = gst_buffer_get_size (buffer);
+ readsize = MIN (size, buf_size - data->pos);
return gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, data->pos,
readsize);