summaryrefslogtreecommitdiff
path: root/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-Need-to-check-if-pa-stream-is-still-valid.patch
blob: f2ee02ed54b5f3da275c92549a6d0ef93cffc803 (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
From a4af947cb793cd3b9550c76d1ea8db7d3a94612a Mon Sep 17 00:00:00 2001
From: Jian <Jian.Li@freescale.com>
Date: Tue, 3 Feb 2015 17:08:40 +0800
Subject: [PATCH 2/4] Need to check if pa stream is still valid

Fixed the issue that will report pulse server is dead
when doing audio track switching.
Need to check if pa stream is valid as it may be released
by caps change.

Upstream-Status: Submitted
https://bugzilla.gnome.org/show_bug.cgi?id=743912

Signed-off-by: Jian <Jian.Li@freescale.com>
---
 ext/pulse/pulsesink.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index 521c4a6..931f1c8 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -2022,6 +2022,13 @@ gst_pulsesink_get_time (GstClock * clock, GstAudioBaseSink * sink)
   }
 
   pa_threaded_mainloop_lock (mainloop);
+
+  /* Need to check if pa stream is valid as it may be released by caps change*/
+  if (!pbuf->stream) {
+    pa_threaded_mainloop_unlock (mainloop);
+    return GST_CLOCK_TIME_NONE;
+  }
+
   if (gst_pulsering_is_dead (psink, pbuf, TRUE))
     goto server_dead;
 
-- 
1.9.1