summaryrefslogtreecommitdiff
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
parente1f257af7ba4fb63deaabd86a9e571259a1135d0 (diff)
downloadopenembedded-core-41ad94640b6369e6a7c49c09773cb58b245c73ac.tar.gz
openembedded-core-41ad94640b6369e6a7c49c09773cb58b245c73ac.tar.bz2
openembedded-core-41ad94640b6369e6a7c49c09773cb58b245c73ac.zip
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>
-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 0000000000..cc095873f9
--- /dev/null
+++ b/meta/recipes-sato/owl-video-widget/libowl-av/gst_change_state.patch
@@ -0,0 +1,40 @@
+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.
+
+Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -ruN libowl-av-orig/libowl-av/owl-tag-reader.c libowl-av/libowl-av/owl-tag-reader.c
+--- libowl-av-orig/libowl-av/owl-tag-reader.c 2010-10-12 14:30:26.000000000 +0800
++++ libowl-av/libowl-av/owl-tag-reader.c 2010-10-12 14:32:39.000000000 +0800
+@@ -300,13 +300,23 @@
+ GstCaps *caps,
+ OwlTagReader *tag_reader)
+ {
++ GstMessage *message;
++ GstBus *bus;
++
+ tag_reader->priv->current_error =
+ g_error_new (OWL_TAG_READER_ERROR,
+ OWL_TAG_READER_ERROR_UNKNOWN_TYPE,
+ "Unknown type");
+
+- flush_head (tag_reader);
+- feed_head (tag_reader);
++ /**
++ * Post a message to the bus, as we are in another thread here.
++ **/
++ message = gst_message_new_error(GST_OBJECT (decodebin),
++ tag_reader->priv->current_error, NULL);
++
++ bus = gst_pipeline_get_bus (GST_PIPELINE (tag_reader->priv->pipeline));
++ gst_bus_post (bus, message);
++ gst_object_unref (GST_OBJECT (bus));
+ }
+
+ /**
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 be3469965a..e00d3b6d9a 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"
RRECOMMENDS = "gst-meta-audio gst-meta-video"
PV = "0.0+svnr${SRCREV}"
-PR = "r3"
+PR = "r4"
S = "${WORKDIR}/${PN}"
-SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=${PN};proto=http"
+SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=${PN};proto=http \
+ file://gst_change_state.patch"
inherit autotools pkgconfig