summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/owl-video-widget
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2010-10-13 02:08:44 (GMT)
committerSaul Wold <Saul.Wold@intel.com>2010-10-13 18:29:13 (GMT)
commit41ad94640b6369e6a7c49c09773cb58b245c73ac (patch)
treee8ef3bb32ecdcf7bb7b16b70c34a9b894541c479 /meta/recipes-sato/owl-video-widget
parente1f257af7ba4fb63deaabd86a9e571259a1135d0 (diff)
downloadpoky-41ad94640b6369e6a7c49c09773cb58b245c73ac.tar.gz
libowl-av: Fix music player crash if adding unknown type files
Using bus message to call function flush_head/feed_head in main thread to protect private data operation. A better fix may be to listen to bus message "CODEC_NOT_FOUND" and "MISSING_PLUGIN" directly to avoid hooking into "unknown-type" signal. We will revisit it in next period. This fixes [BUGID #296] Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Diffstat (limited to 'meta/recipes-sato/owl-video-widget')
-rw-r--r--meta/recipes-sato/owl-video-widget/libowl-av/gst_change_state.patch40
-rw-r--r--meta/recipes-sato/owl-video-widget/libowl-av_svn.bb5
2 files changed, 43 insertions, 2 deletions
diff --git a/meta/recipes-sato/owl-video-widget/libowl-av/gst_change_state.patch b/meta/recipes-sato/owl-video-widget/libowl-av/gst_change_state.patch
new file mode 100644
index 0000000..cc09587
--- /dev/null
+++ b/meta/recipes-sato/owl-video-widget/libowl-av/gst_change_state.patch
@@ -0,0 +1,40 @@
1Fix music player crash if adding unknown type files.
2
3Using bus message to call function flush_head/feed_head in main thread
4to protect private data operation.
5
6A better fix may be to listen to bus message "CODEC_NOT_FOUND" and
7"MISSING_PLUGIN" directly to avoid hooking into "unknown-type" signal.
8We will revisit it in next period.
9
10Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
11
12diff -ruN libowl-av-orig/libowl-av/owl-tag-reader.c libowl-av/libowl-av/owl-tag-reader.c
13--- libowl-av-orig/libowl-av/owl-tag-reader.c 2010-10-12 14:30:26.000000000 +0800
14+++ libowl-av/libowl-av/owl-tag-reader.c 2010-10-12 14:32:39.000000000 +0800
15@@ -300,13 +300,23 @@
16 GstCaps *caps,
17 OwlTagReader *tag_reader)
18 {
19+ GstMessage *message;
20+ GstBus *bus;
21+
22 tag_reader->priv->current_error =
23 g_error_new (OWL_TAG_READER_ERROR,
24 OWL_TAG_READER_ERROR_UNKNOWN_TYPE,
25 "Unknown type");
26
27- flush_head (tag_reader);
28- feed_head (tag_reader);
29+ /**
30+ * Post a message to the bus, as we are in another thread here.
31+ **/
32+ message = gst_message_new_error(GST_OBJECT (decodebin),
33+ tag_reader->priv->current_error, NULL);
34+
35+ bus = gst_pipeline_get_bus (GST_PIPELINE (tag_reader->priv->pipeline));
36+ gst_bus_post (bus, message);
37+ gst_object_unref (GST_OBJECT (bus));
38 }
39
40 /**
diff --git a/meta/recipes-sato/owl-video-widget/libowl-av_svn.bb b/meta/recipes-sato/owl-video-widget/libowl-av_svn.bb
index be34699..e00d3b6 100644
--- a/meta/recipes-sato/owl-video-widget/libowl-av_svn.bb
+++ b/meta/recipes-sato/owl-video-widget/libowl-av_svn.bb
@@ -13,10 +13,11 @@ RDEPENDS = "gst-meta-base"
13RRECOMMENDS = "gst-meta-audio gst-meta-video" 13RRECOMMENDS = "gst-meta-audio gst-meta-video"
14 14
15PV = "0.0+svnr${SRCREV}" 15PV = "0.0+svnr${SRCREV}"
16PR = "r3" 16PR = "r4"
17 17
18S = "${WORKDIR}/${PN}" 18S = "${WORKDIR}/${PN}"
19 19
20SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=${PN};proto=http" 20SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=${PN};proto=http \
21 file://gst_change_state.patch"
21 22
22inherit autotools pkgconfig 23inherit autotools pkgconfig