mplex: break statement unnecessary

One more code flow issue where it never arrives to the break statement due to
the goto. So the break is unnecessary.
Plus two coding style fixes.

https://bugzilla.gnome.org/show_bug.cgi?id=736895
This commit is contained in:
Anuj Jaiswal 2014-09-18 17:26:37 +05:30 committed by Luis de Bethencourt
parent 085a34e4c7
commit e4247f0a5a

View file

@ -190,8 +190,7 @@ gst_mplex_init (GstMplex * mplex)
{ {
GstElement *element = GST_ELEMENT (mplex); GstElement *element = GST_ELEMENT (mplex);
mplex->srcpad = mplex->srcpad = gst_pad_new_from_static_template (&src_templ, "src");
gst_pad_new_from_static_template (&src_templ, "src");
gst_element_add_pad (element, mplex->srcpad); gst_element_add_pad (element, mplex->srcpad);
gst_pad_use_fixed_caps (mplex->srcpad); gst_pad_use_fixed_caps (mplex->srcpad);
gst_pad_set_activatemode_function (mplex->srcpad, gst_pad_set_activatemode_function (mplex->srcpad,
@ -507,7 +506,7 @@ gst_mplex_sink_event (GstPad * sinkpad, GstObject * parent, GstEvent * event)
result = gst_mplex_setcaps (sinkpad, caps); result = gst_mplex_setcaps (sinkpad, caps);
gst_event_unref (event); gst_event_unref (event);
goto done; goto done;
break;
} }
default: default:
/* for a serialized event, wait until earlier data is gone, /* for a serialized event, wait until earlier data is gone,
@ -537,7 +536,8 @@ gst_mplex_start_task (GstMplex * mplex)
if (G_UNLIKELY (mplex->srcresult == GST_FLOW_CUSTOM_SUCCESS) if (G_UNLIKELY (mplex->srcresult == GST_FLOW_CUSTOM_SUCCESS)
&& mplex->job->video_tracks == mplex->num_vpads && mplex->job->video_tracks == mplex->num_vpads
&& mplex->job->audio_tracks == mplex->num_apads) { && mplex->job->audio_tracks == mplex->num_apads) {
gst_pad_start_task (mplex->srcpad, (GstTaskFunction) gst_mplex_loop, mplex, NULL); gst_pad_start_task (mplex->srcpad, (GstTaskFunction) gst_mplex_loop, mplex,
NULL);
mplex->srcresult = GST_FLOW_OK; mplex->srcresult = GST_FLOW_OK;
} }
} }