basesink: Make sure we never drop the preroll buffer

This is cosmetic as 'late' should never be set during preroll (in pause).
Though code may evolve in the future, so this is good for preventing
potential bugs.

https://bugzilla.gnome.org/show_bug.cgi?id=772468
This commit is contained in:
Nicolas Dufresne 2016-11-03 15:22:34 -04:00
parent 5ca63b7f04
commit 7c8087f49a

View file

@ -3476,15 +3476,15 @@ gst_base_sink_chain_unlocked (GstBaseSink * basesink, GstPad * pad,
}
}
if (G_UNLIKELY (late))
goto dropped;
/* We are about to prepare the first frame, make sure we have prerolled
* already. This prevent nesting prepare/render calls. */
ret = gst_base_sink_do_preroll (basesink, obj);
if (G_UNLIKELY (ret != GST_FLOW_OK))
goto preroll_failed;
if (G_UNLIKELY (late))
goto dropped;
if (!is_list) {
if (bclass->prepare) {
ret = bclass->prepare (basesink, GST_BUFFER_CAST (obj));