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:
edb8bc8
)
sample: free info structure with sample if there is one and fix copy with NULL info...
author
Tim-Philipp Müller
<tim.muller@collabora.co.uk>
Mon, 10 Sep 2012 15:52:46 +0000
(16:52 +0100)
committer
Tim-Philipp Müller
<tim.muller@collabora.co.uk>
Mon, 10 Sep 2012 15:52:46 +0000
(16:52 +0100)
gst/gstsample.c
patch
|
blob
|
history
diff --git
a/gst/gstsample.c
b/gst/gstsample.c
index
618d328
..
93cb0b0
100644
(file)
--- a/
gst/gstsample.c
+++ b/
gst/gstsample.c
@@
-59,7
+59,7
@@
_gst_sample_copy (GstSample * sample)
GstSample *copy;
copy = gst_sample_new (sample->buffer, sample->caps, &sample->segment,
-
gst_structure_copy (sample->info)
);
+
(sample->info) ? gst_structure_copy (sample->info) : NULL
);
return copy;
}
@@
-73,7
+73,10
@@
_gst_sample_free (GstSample * sample)
gst_buffer_unref (sample->buffer);
if (sample->caps)
gst_caps_unref (sample->caps);
-
+ if (sample->info) {
+ gst_structure_set_parent_refcount (sample->info, NULL);
+ gst_structure_free (sample->info);
+ }
g_slice_free1 (sizeof (GstSample), sample);
}