summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/owl-video-widget/libowl-av
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2010-10-13 10:08:44 +0800
committerSaul Wold <Saul.Wold@intel.com>2010-10-13 11:29:13 -0700
commit41ad94640b6369e6a7c49c09773cb58b245c73ac (patch)
treee8ef3bb32ecdcf7bb7b16b70c34a9b894541c479 /meta/recipes-sato/owl-video-widget/libowl-av
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/libowl-av')
-rw-r--r--meta/recipes-sato/owl-video-widget/libowl-av/gst_change_state.patch40
1 files changed, 40 insertions, 0 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 0000000000..cc095873f9
--- /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 /**