audiosink: return the return value of wait_preroll

Return the value that _wait_preroll() returned instead of always WRONG_STATE.
This commit is contained in:
Wim Taymans 2009-05-19 17:17:37 +02:00
parent ef56ebad48
commit c68a361e31

View file

@ -1489,7 +1489,7 @@ no_sync:
break; break;
/* else something interrupted us and we wait for preroll. */ /* else something interrupted us and we wait for preroll. */
if (gst_base_sink_wait_preroll (bsink) != GST_FLOW_OK) if ((ret = gst_base_sink_wait_preroll (bsink)) != GST_FLOW_OK)
goto stopping; goto stopping;
/* if we got interrupted, we cannot assume that the next sample should /* if we got interrupted, we cannot assume that the next sample should
@ -1549,7 +1549,7 @@ wrong_size:
stopping: stopping:
{ {
GST_DEBUG_OBJECT (sink, "ringbuffer is stopping"); GST_DEBUG_OBJECT (sink, "ringbuffer is stopping");
return GST_FLOW_WRONG_STATE; return ret;
} }
sync_latency_failed: sync_latency_failed:
{ {