[rygel-gst-0-10-plugins] Fix a slew of bugs and crashers.



commit 74a7d20e9cd9800c873eec5a9dd659f714773255
Author: Krzesimir Nowak <krnowak openismus com>
Date:   Thu Feb 7 15:38:04 2013 +0100

    Fix a slew of bugs and crashers.

 src/media-export/rygel-media-export-harvester.c    |    2 ++
 .../rygel-media-export-harvesting-task.c           |    2 +-
 src/media-export/rygel-media-export-item-factory.c |    5 +++--
 src/media-export/rygel-media-export-media-cache.c  |    5 ++---
 4 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/media-export/rygel-media-export-harvester.c b/src/media-export/rygel-media-export-harvester.c
index d9b6d5f..c2291b2 100644
--- a/src/media-export/rygel-media-export-harvester.c
+++ b/src/media-export/rygel-media-export-harvester.c
@@ -168,6 +168,8 @@ rygel_media_export_harvester_on_file_added (RygelMediaExportHarvester *self,
         if (RYGEL_IS_MEDIA_CONTAINER (another_object)) {
           parent_container = RYGEL_MEDIA_CONTAINER (another_object);
         }
+
+        break;
       }
     } while (!parent_container);
     rygel_media_export_harvester_schedule (self, current, parent_container, NULL);
diff --git a/src/media-export/rygel-media-export-harvesting-task.c b/src/media-export/rygel-media-export-harvesting-task.c
index 122c66d..a8e1ae2 100644
--- a/src/media-export/rygel-media-export-harvesting-task.c
+++ b/src/media-export/rygel-media-export-harvesting-task.c
@@ -491,7 +491,7 @@ rygel_media_export_harvesting_task_on_extracted_cb (RygelMediaExportHarvestingTa
   if (top_file) {
     g_object_unref (top_file);
   }
-  if (!ignore) {
+  if (ignore) {
     return;
   }
   container = RYGEL_MEDIA_CONTAINER (g_queue_peek_head (priv->containers));
diff --git a/src/media-export/rygel-media-export-item-factory.c b/src/media-export/rygel-media-export-item-factory.c
index b9a9e2b..64c7b7f 100644
--- a/src/media-export/rygel-media-export-item-factory.c
+++ b/src/media-export/rygel-media-export-item-factory.c
@@ -307,7 +307,7 @@ void rygel_media_export_item_factory_fill_media_item (RygelMediaItem *item, GFil
   if (!info)
     return;
 
-  const GstTagList *tags = gst_discoverer_stream_info_get_tags ((GstDiscovererStreamInfo*) info);
+  const GstTagList *tags = gst_discoverer_info_get_tags (info);
   gchar *title = NULL;
   if (!tags || !gst_tag_list_get_string (tags, GST_TAG_TITLE, &title)) {
     title = g_strdup (g_file_info_get_display_name (file_info));
@@ -339,9 +339,10 @@ void rygel_media_export_item_factory_fill_media_item (RygelMediaItem *item, GFil
                 gchar* datestr = g_time_val_to_iso8601 (&tv);
                 rygel_media_item_set_date (item, datestr);
                 g_free (datestr);
+  } else {
+    g_date_free (date);
   }
 
-  g_date_free (date);
 
 
         rygel_media_item_set_size (item,
diff --git a/src/media-export/rygel-media-export-media-cache.c b/src/media-export/rygel-media-export-media-cache.c
index 3e03bed..6f2494f 100644
--- a/src/media-export/rygel-media-export-media-cache.c
+++ b/src/media-export/rygel-media-export-media-cache.c
@@ -166,7 +166,6 @@ rygel_media_export_media_cache_new (GError **error) {
     return NULL;
   }
   priv->factory = rygel_media_export_object_factory_new ();
-  g_object_unref (self->priv->factory);
   rygel_media_export_media_cache_get_exists_cache (self, &inner_error);
   if (inner_error) {
     g_propagate_error (error, inner_error);
@@ -451,7 +450,6 @@ rygel_media_export_media_cache_exists (RygelMediaExportMediaCache  *self,
     RygelMediaExportExistsCacheEntry *entry = (RygelMediaExportExistsCacheEntry *) gee_abstract_map_get (abstract_exists_cache, uri);
 
     gee_abstract_map_unset (abstract_exists_cache, uri, NULL);
-    rygel_media_export_exists_cache_entry_free (entry);
     g_free (uri);
     if (timestamp) {
       *timestamp = entry->mtime;
@@ -459,6 +457,7 @@ rygel_media_export_media_cache_exists (RygelMediaExportMediaCache  *self,
     if (size) {
       *size = entry->size;
     }
+    rygel_media_export_exists_cache_entry_free (entry);
     return TRUE;
   }
 
@@ -1682,10 +1681,10 @@ rygel_media_export_media_cache_search_expression_to_sql (RygelSearchExpression
     return g_strdup ("");
   }
 
+  inner_error = NULL;
   if (RYGEL_IS_LOGICAL_EXPRESSION (expression)) {
     gchar *str;
 
-    inner_error = NULL;
     str = rygel_media_export_media_cache_logical_expression_to_sql (RYGEL_LOGICAL_EXPRESSION (expression),
                                                                     args,
                                                                     &inner_error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]