summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/owl-video-widget/libowl-av/gst_change_state.patch
blob: 5bc279a0197f52d1830611901e3c96724b7f1f15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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>

Upstream-Status: Pending

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));
 }
 
 /**