mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-05 06:58:49 +00:00
state change fixes from Pedro Corte-Real for shout and shout2 plugins
Original commit message from CVS: state change fixes from Pedro Corte-Real for shout and shout2 plugins
This commit is contained in:
parent
6fdb0b8039
commit
4344085222
1 changed files with 5 additions and 4 deletions
|
@ -397,7 +397,7 @@ gst_icecastsend_change_state (GstElement *element)
|
||||||
|
|
||||||
/* if going down into NULL state, close the file if it's open */
|
/* if going down into NULL state, close the file if it's open */
|
||||||
switch (GST_STATE_TRANSITION (element)) {
|
switch (GST_STATE_TRANSITION (element)) {
|
||||||
case GST_STATE_NULL_TO_READY:
|
case GST_STATE_READY_TO_NULL:
|
||||||
shout_init_connection (&icecastsend->conn);
|
shout_init_connection (&icecastsend->conn);
|
||||||
|
|
||||||
/* --- FIXME: shout requires an ip, and fails if it is given a host. */
|
/* --- FIXME: shout requires an ip, and fails if it is given a host. */
|
||||||
|
@ -422,13 +422,14 @@ gst_icecastsend_change_state (GstElement *element)
|
||||||
g_print ("connected to server...\n");
|
g_print ("connected to server...\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* changed from g_warning, and included result code lookup. */
|
g_warning ("couldn't connect to server... (%i: %s)\n",
|
||||||
g_warning ("couldn't connect to server... (%i: %s)\n", icecastsend->conn.error, SHOUT_ERRORS[icecastsend->conn.error]);
|
icecastsend->conn.error,
|
||||||
|
SHOUT_ERRORS[icecastsend->conn.error]);
|
||||||
shout_disconnect (&icecastsend->conn);
|
shout_disconnect (&icecastsend->conn);
|
||||||
return GST_STATE_FAILURE;
|
return GST_STATE_FAILURE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GST_STATE_READY_TO_NULL:
|
case GST_STATE_PAUSED_TO_READY:
|
||||||
shout_disconnect (&icecastsend->conn);
|
shout_disconnect (&icecastsend->conn);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue