recorder-src: Rewrite switch statement
Avoid compiler warnings about unhandled enum values by using a regular if-else statement.
This commit is contained in:
parent
7ef519756a
commit
9dd3162dbe
@ -156,17 +156,17 @@ shell_recorder_src_send_event (GstElement * element, GstEvent * event)
|
|||||||
ShellRecorderSrc *src = SHELL_RECORDER_SRC (element);
|
ShellRecorderSrc *src = SHELL_RECORDER_SRC (element);
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS)
|
||||||
case GST_EVENT_EOS:
|
{
|
||||||
shell_recorder_src_close (src);
|
shell_recorder_src_close (src);
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
break;
|
}
|
||||||
default:
|
else
|
||||||
|
{
|
||||||
res = GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, send_event, (element,
|
res = GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, send_event, (element,
|
||||||
event), FALSE);
|
event), FALSE);
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user