[Xfce4-commits] <parole:master> Check for stream type before settings the live bit.

Ali Abdallah noreply at xfce.org
Thu Dec 10 22:32:01 CET 2009


Updating branch refs/heads/master
         to eecb19706a3eedb207822f1693a5a285c96c7e2d (commit)
       from 13b11af6b8d4b34f8aec719c9d42d844ead81a7f (commit)

commit eecb19706a3eedb207822f1693a5a285c96c7e2d
Author: Ali Abdallah <aliov at xfce.org>
Date:   Thu Dec 10 22:29:05 2009 +0100

    Check for stream type before settings the live bit.

 parole/parole-stream.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/parole/parole-stream.c b/parole/parole-stream.c
index 580e57a..4e9cd21 100644
--- a/parole/parole-stream.c
+++ b/parole/parole-stream.c
@@ -150,8 +150,16 @@ static void parole_stream_set_property (GObject *object,
 	    PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->subtitles, value);
 	    break;
 	case PROP_LIVE:
-	    PAROLE_STREAM_GET_PRIVATE (stream)->live = g_value_get_boolean (value);
+	{
+	    ParoleStreamPrivate *priv;
+	    gboolean maybe_remote;
+	    
+	    priv = PAROLE_STREAM_GET_PRIVATE (stream);
+	    maybe_remote = priv->media_type == PAROLE_MEDIA_TYPE_REMOTE ||
+	                   priv->media_type == PAROLE_MEDIA_TYPE_UNKNOWN;
+	    priv->live = g_value_get_boolean (value) && maybe_remote;
 	    break;
+	}
 	case PROP_MEDIA_TYPE:
 	    PAROLE_STREAM_GET_PRIVATE (stream)->media_type = g_value_get_enum (value);
 	    break;



More information about the Xfce4-commits mailing list