mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:56:14 +00:00
ext/shout2/gstshout2.c: Don't crash in case the connection to the server fails: don't set pointer to NULL by assignin...
Original commit message from CVS: * ext/shout2/gstshout2.c: (gst_shout2send_render): Don't crash in case the connection to the server fails: don't set pointer to NULL by assigning FALSE; error out properly by using GST_ELEMENT_ERROR and returning GST_FLOW_ERROR (fixes #338636). Lastly, free connection before resetting the pointer.
This commit is contained in:
parent
5ff469042f
commit
d0b7fc0d81
2 changed files with 18 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2006-04-17 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* ext/shout2/gstshout2.c: (gst_shout2send_render):
|
||||||
|
Don't crash in case the connection to the server fails:
|
||||||
|
don't set pointer to NULL by assigning FALSE; error out
|
||||||
|
properly by using GST_ELEMENT_ERROR and returning
|
||||||
|
GST_FLOW_ERROR (fixes #338636). Lastly, free connection
|
||||||
|
before resetting the pointer.
|
||||||
|
|
||||||
2006-04-17 Jan Schmidt <thaytan@mad.scientist.com>
|
2006-04-17 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* gst/id3demux/id3tags.c:
|
* gst/id3demux/id3tags.c:
|
||||||
|
|
|
@ -384,10 +384,16 @@ gst_shout2send_render (GstBaseSink * sink, GstBuffer * buf)
|
||||||
shout2send->started = TRUE;
|
shout2send->started = TRUE;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
GST_ERROR ("Couldn't connect to server: %s",
|
GST_ERROR_OBJECT (shout2send, "Couldn't connect to server: %s",
|
||||||
shout_get_error (shout2send->conn));
|
shout_get_error (shout2send->conn));
|
||||||
shout2send->conn = FALSE;
|
GST_ELEMENT_ERROR (shout2send, RESOURCE, OPEN_WRITE,
|
||||||
|
(NULL), GST_ERROR_SYSTEM);
|
||||||
|
g_signal_emit (G_OBJECT (shout2send),
|
||||||
|
gst_shout2send_signals[SIGNAL_CONNECTION_PROBLEM], 0,
|
||||||
|
shout_get_errno (shout2send->conn));
|
||||||
|
shout_free (shout2send->conn);
|
||||||
|
shout2send->conn = NULL;
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue