summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathon Jongsma <jonathon.jongsma@collabora.co.uk>2011-12-20 20:13:56 (GMT)
committerOlivier CrĂȘte <olivier.crete@collabora.com>2011-12-20 20:18:43 (GMT)
commit052ae546e9a8afaf7f4bea751194e9c39d9fd46e (patch)
treeac2da2e6d594a7e92682b4cb7244829e24856d0e
parente58a6d7e4fdb3da7b8d5e66cf464da796b1c9200 (diff)
downloadfarstream-052ae546e9a8afaf7f4bea751194e9c39d9fd46e.tar.gz
farstream-052ae546e9a8afaf7f4bea751194e9c39d9fd46e.tar.xz
Fix fs_stream_parse_component_state_changed()
Check for the right message name and parse the state as an enum, rather than a uint.
-rw-r--r--farstream/fs-stream.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/farstream/fs-stream.c b/farstream/fs-stream.c
index 4c7b040..5f75d13 100644
--- a/farstream/fs-stream.c
+++ b/farstream/fs-stream.c
@@ -841,7 +841,7 @@ fs_stream_parse_recv_codecs_changed (FsStream *stream,
* @component: (out): Returns the component from the #GstMessage if not %NULL
* @state: (out): Returns the #FsStreamState from the #GstMessage if not %NULL
*
- * Parses a "farstream-recv-codec-changed" message and checks if it matches
+ * Parses a "farstream-component-state-changed" message and checks if it matches
* the @stream parameters.
*
* Returns: %TRUE if the message matches the stream and is valid.
@@ -857,7 +857,7 @@ fs_stream_parse_component_state_changed (FsStream *stream,
g_return_val_if_fail (stream != NULL, FALSE);
- if (!check_message (message, stream, "farstream-recv-codec-changed"))
+ if (!check_message (message, stream, "farstream-component-state-changed"))
return FALSE;
s = gst_message_get_structure (message);
@@ -870,10 +870,10 @@ fs_stream_parse_component_state_changed (FsStream *stream,
value = gst_structure_get_value (s, "state");
- if (!value || !G_VALUE_HOLDS (value, G_TYPE_UINT))
+ if (!value || !G_VALUE_HOLDS (value, G_TYPE_ENUM))
return FALSE;
if (state)
- *state = g_value_get_uint (value);
+ *state = g_value_get_enum (value);
return TRUE;
}