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,12 +1182,12 @@ recorder_pipeline_bus_watch (GstBus *bus,
{ {
RecorderPipeline *pipeline = data; RecorderPipeline *pipeline = data;
switch (message->type) if (message->type == GST_MESSAGE_EOS)
{ {
case GST_MESSAGE_EOS:
recorder_pipeline_closed (pipeline); recorder_pipeline_closed (pipeline);
return FALSE; /* remove watch */ return FALSE; /* remove watch */
case GST_MESSAGE_ERROR: }
else if (message->type == GST_MESSAGE_ERROR)
{ {
GError *error; GError *error;
@ -1197,9 +1197,6 @@ recorder_pipeline_bus_watch (GstBus *bus,
recorder_pipeline_closed (pipeline); recorder_pipeline_closed (pipeline);
return FALSE; /* remove watch */ return FALSE; /* remove watch */
} }
default:
break;
}
/* Leave the watch in place */ /* Leave the watch in place */
return TRUE; return TRUE;