[tracker] Add a safeguard to freeing the pipeline in gstreamer extractor
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker] Add a safeguard to freeing the pipeline in gstreamer extractor
- Date: Fri, 24 Apr 2009 08:44:36 -0400 (EDT)
commit 2b99edc2e0f7176e8dcb3d91104bb3350aff5441
Author: Mikael Ottela <mikael ottela ixonos com>
Date: Fri Apr 24 11:53:57 2009 +0300
Add a safeguard to freeing the pipeline in gstreamer extractor
A safeguard has been added in gstreamer extractor to check that the pipeline
is in NULL state before freeing it.
Fixes NB#112393.
---
src/tracker-extract/tracker-extract-gstreamer.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index d44c0a8..9af3b17 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -40,6 +40,9 @@
#include "tracker-main.h"
#include "tracker-extract-albumart.h"
+/* We wait this long (seconds) for NULL state before freeing */
+#define TRACKER_EXTRACT_GUARD_TIMEOUT 3
+
/* An additional tag in gstreamer for the content source. Remove when in upstream */
#ifndef GST_TAG_CLASSIFICATION
#define GST_TAG_CLASSIFICATION "classification"
@@ -875,6 +878,7 @@ tracker_extract_gstreamer (const gchar *uri,
g_free (scount);
gst_element_set_state (extractor->pipeline, GST_STATE_NULL);
+ gst_element_get_state (extractor->pipeline, NULL, NULL, TRACKER_EXTRACT_GUARD_TIMEOUT* GST_SECOND);
gst_object_unref (extractor->bus);
if (extractor->tagcache) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]