gst/base/basesink: Remove dead assignment.

The code was previously:
* checking if ret was != OK
* .. but if it was FLOW_STEP, swith it to OK
* .. and then not using ret

Instead we just make it more compact by checking if it's OK or STEP.
This commit is contained in:
Edward Hervey 2009-10-08 08:53:54 +02:00
parent 015c5dda8f
commit a8e03abd17

View file

@ -2086,14 +2086,10 @@ gst_base_sink_do_preroll (GstBaseSink * sink, GstMiniObject * obj)
if (G_LIKELY (sink->need_preroll)) {
/* block until the state changes, or we get a flush, or something */
ret = gst_base_sink_wait_preroll (sink);
if (ret != GST_FLOW_OK) {
if (ret == GST_FLOW_STEP)
ret = GST_FLOW_OK;
else
if ((ret != GST_FLOW_OK) && (ret != GST_FLOW_STEP))
goto preroll_failed;
}
}
}
return GST_FLOW_OK;
/* ERRORS */
@ -2139,13 +2135,9 @@ gst_base_sink_wait_eos (GstBaseSink * sink, GstClockTime time,
/* first wait for the playing state before we can continue */
if (G_UNLIKELY (sink->need_preroll)) {
ret = gst_base_sink_wait_preroll (sink);
if (ret != GST_FLOW_OK) {
if (ret == GST_FLOW_STEP)
ret = GST_FLOW_OK;
else
if ((ret != GST_FLOW_OK) && (ret != GST_FLOW_STEP))
goto flushing;
}
}
/* preroll done, we can sync since we are in PLAYING now. */
GST_DEBUG_OBJECT (sink, "possibly waiting for clock to reach %"