recorder: Rewrite switch statement

Avoid compiler warnings about unhandled enum values by using a
regular if-else statement.
This commit is contained in:
Florian Müllner 2015-09-23 20:43:42 +02:00
parent 9dd3162dbe
commit 82f84416a9

View File

@ -1182,23 +1182,20 @@ recorder_pipeline_bus_watch (GstBus *bus,
{
RecorderPipeline *pipeline = data;
switch (message->type)
if (message->type == GST_MESSAGE_EOS)
{
case GST_MESSAGE_EOS:
recorder_pipeline_closed (pipeline);
return FALSE; /* remove watch */
case GST_MESSAGE_ERROR:
{
GError *error;
}
else if (message->type == GST_MESSAGE_ERROR)
{
GError *error;
gst_message_parse_error (message, &error, NULL);
g_warning ("Error in recording pipeline: %s\n", error->message);
g_error_free (error);
recorder_pipeline_closed (pipeline);
return FALSE; /* remove watch */
}
default:
break;
gst_message_parse_error (message, &error, NULL);
g_warning ("Error in recording pipeline: %s\n", error->message);
g_error_free (error);
recorder_pipeline_closed (pipeline);
return FALSE; /* remove watch */
}
/* Leave the watch in place */