[tracker] tracker-extract,gstreamer: Fix leak
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract,gstreamer: Fix leak
- Date: Fri, 2 Dec 2011 15:40:27 +0000 (UTC)
commit 523da507f49704efc77d02a8fe6f5ba7812f89c7
Author: Carlos Garnacho <carlos lanedo com>
Date: Fri Dec 2 16:26:00 2011 +0100
tracker-extract,gstreamer: Fix leak
Append elements to extractor->tagcache instead of replacing
the list.
src/tracker-extract/tracker-extract-gstreamer.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 3f95a42..c05279a 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -1277,6 +1277,7 @@ discoverer_init_and_run (MetadataExtractor *extractor,
const gchar *uri)
{
GstDiscovererInfo *info;
+ const GstTagList *discoverer_tags;
GError *error = NULL;
GList *l;
@@ -1366,15 +1367,19 @@ discoverer_init_and_run (MetadataExtractor *extractor,
extractor->duration = gst_discoverer_info_get_duration (info) / GST_SECOND;
/* Retrieve global tags */
- extractor->tagcache = gst_tag_list_merge (NULL,
- gst_discoverer_info_get_tags (info),
- GST_TAG_MERGE_APPEND);
+ discoverer_tags = gst_discoverer_info_get_tags (info);
+
+ if (discoverer_tags) {
+ gst_tag_list_insert (extractor->tagcache,
+ discoverer_tags,
+ GST_TAG_MERGE_APPEND);
+ }
/* Get list of Streams to iterate */
extractor->streams = gst_discoverer_info_get_stream_list (info);
for (l = extractor->streams; l; l = g_list_next (l)) {
GstDiscovererStreamInfo *stream = l->data;
- GstTagList *stream_tags;
+ const GstTagList *stream_tags;
if (G_TYPE_CHECK_INSTANCE_TYPE (stream, GST_TYPE_DISCOVERER_AUDIO_INFO)) {
GstDiscovererAudioInfo *audio = (GstDiscovererAudioInfo*)stream;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]