[tracker/tracker-0.16] tracker-extract-gstreamer: Don't leak file descriptors & use up all FDs
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.16] tracker-extract-gstreamer: Don't leak file descriptors & use up all FDs
- Date: Wed, 31 Jul 2013 22:31:19 +0000 (UTC)
commit eb7a2ee6e992c57c47760b2a21b5ecf57d79d69c
Author: Martyn Russell <martyn lanedo com>
Date: Fri Jul 19 20:36:43 2013 +0100
tracker-extract-gstreamer: Don't leak file descriptors & use up all FDs
The GStreamer extractor was not calling all the shutdown functions internally
to clean up streams in failure conditions.
https://bugzilla.gnome.org/show_bug.cgi?id=704048
https://bugzilla.redhat.com/show_bug.cgi?id=741479
https://bugzilla.redhat.com/show_bug.cgi?id=959020
src/libtracker-extract/tracker-extract-client.c | 3 +
src/tracker-extract/tracker-extract-gstreamer.c | 57 +++++++++++------------
2 files changed, 30 insertions(+), 30 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-extract-client.c b/src/libtracker-extract/tracker-extract-client.c
index 0163616..200fa40 100644
--- a/src/libtracker-extract/tracker-extract-client.c
+++ b/src/libtracker-extract/tracker-extract-client.c
@@ -419,6 +419,9 @@ get_metadata_fast_async (GDBusConnection *connection,
g_object_unref (fd_list);
g_error_free (error);
+
+ /* FIXME: Close pipes? */
+
return;
}
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 5fa099f..1312cdf 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -2041,41 +2041,38 @@ tracker_extract_gstreamer (const gchar *uri,
success = discoverer_init_and_run (extractor, uri);
#endif
- if (!success) {
- gst_tag_list_free (extractor->tagcache);
- g_slice_free (MetadataExtractor, extractor);
- return;
- }
-
- cue_sheet = get_embedded_cue_sheet_data (extractor->tagcache);
-
- if (cue_sheet) {
- g_debug ("Using embedded CUE sheet.");
- extractor->toc = tracker_cue_sheet_parse (cue_sheet);
- g_free (cue_sheet);
- }
+ if (success) {
+ cue_sheet = get_embedded_cue_sheet_data (extractor->tagcache);
- if (extractor->toc == NULL) {
- extractor->toc = tracker_cue_sheet_parse_uri (uri);
- }
+ if (cue_sheet) {
+ g_debug ("Using embedded CUE sheet.");
+ extractor->toc = tracker_cue_sheet_parse (cue_sheet);
+ g_free (cue_sheet);
+ }
- extract_metadata (extractor,
- uri,
- preupdate,
- postupdate,
- metadata,
- graph);
+ if (extractor->toc == NULL) {
+ extractor->toc = tracker_cue_sheet_parse_uri (uri);
+ }
- if (extractor->media_art_type != TRACKER_MEDIA_ART_NONE) {
- tracker_media_art_process (extractor->media_art_buffer,
- extractor->media_art_buffer_size,
- extractor->media_art_buffer_mime,
- extractor->media_art_type,
- extractor->media_art_artist,
- extractor->media_art_title,
- uri);
+ extract_metadata (extractor,
+ uri,
+ preupdate,
+ postupdate,
+ metadata,
+ graph);
+
+ if (extractor->media_art_type != TRACKER_MEDIA_ART_NONE) {
+ tracker_media_art_process (extractor->media_art_buffer,
+ extractor->media_art_buffer_size,
+ extractor->media_art_buffer_mime,
+ extractor->media_art_type,
+ extractor->media_art_artist,
+ extractor->media_art_title,
+ uri);
+ }
}
+ /* Clean up */
g_free (extractor->media_art_artist);
g_free (extractor->media_art_title);
if (extractor->sample) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]