basesrc: fix race in PLAYING->PAUSED->PLAYING
basesrc: fix race in PLAYING->PAUSED->PLAYING

When we quickly switch from PLAYING to PAUSED and back to PLAYING it's possible
in some cases that the task refuses to start, This is because when we go to
PAUSED, we unschedule the clock timeout, which could return UNSCHEDULED when
we're back to PLAYING, causing the task to PAUSE again with a wrong-state.

This patch checks if we are running when we return with an UNSCHEDULED return
value and if we are, try to create a new buffer.

Fixes #597550

lovebug356/gstreamer,collects/gstreamer,magcius/gstreamer,mrchapp/gstreamer,surround-io/gstreamer,Distrotech/gstreamer,justinjoy/gstreamer,ylatuya/gstreamer,lovebug356/gstreamer,ylatuya/gstreamer,shelsonjava/gstreamer,StreamUtils/gstreamer,ylatuya/gstreamer,krichter722/gstreamer,drothlis/gstreamer,justinjoy/gstreamer,mparis/gstreamer,cfoch/gstreamer,krieger-od/gstreamer,mrchapp/gstreamer,lubosz/gstreamer,magcius/gstreamer,cfoch/gstreamer,mrchapp/gstreamer,lovebug356/gstreamer,drothlis/gstreamer,StreamUtils/gstreamer,surround-io/gstreamer,lubosz/gstreamer,shelsonjava/gstreamer,StreamUtils/gstreamer,cablelabs/gstreamer,ahmedammar/platform_external_gst_gstreamer,mparis/gstreamer,ensonic/gstreamer,Lachann/gstreamer,ahmedammar/platform_external_gst_gstreamer,centricular/gstreamer,ahmedammar/platform_external_gst_gstreamer,Lachann/gstreamer,surround-io/gstreamer,ahmedammar/platform_external_gst_gstreamer,surround-io/gstreamer,jpakkane/gstreamer,centricular/gstreamer,Distrotech/gstreamer,collects/gstreamer,cablelabs/gstreamer,Lachann/gstreamer,krichter722/gstreamer,drothlis/gstreamer,ensonic/gstreamer,centricular/gstreamer,jpxiong/gstreamer,Distrotech/gstreamer,justinjoy/gstreamer,cfoch/gstreamer,mrchapp/gstreamer,mparis/gstreamer,centricular/gstreamer,magcius/gstreamer,collects/gstreamer,cablelabs/gstreamer,krieger-od/gstreamer,magcius/gstreamer,mparis/gstreamer,ylatuya/gstreamer,cablelabs/gstreamer,krieger-od/gstreamer,StreamUtils/gstreamer,StreamUtils/gstreamer,jpakkane/gstreamer,krieger-od/gstreamer,lubosz/gstreamer,justinjoy/gstreamer,lubosz/gstreamer,krieger-od/gstreamer,jpakkane/gstreamer,drothlis/gstreamer,lovebug356/gstreamer,ylatuya/gstreamer,jpxiong/gstreamer,krichter722/gstreamer,drothlis/gstreamer,krichter722/gstreamer,krichter722/gstreamer,collects/gstreamer,ensonic/gstreamer,jpxiong/gstreamer,centricular/gstreamer,cablelabs/gstreamer,mrchapp/gstreamer,jpakkane/gstreamer,lubosz/gstreamer,mparis/gstreamer,magcius/gstreamer,collects/gstreamer,shelsonjava/gstreamer,ensonic/gstreamer,surround-io/gstreamer,lovebug356/gstreamer,Distrotech/gstreamer,ensonic/gstreamer,cfoch/gstreamer,justinjoy/gstreamer,jpxiong/gstreamer,jpakkane/gstreamer,Lachann/gstreamer,shelsonjava/gstreamer,Lachann/gstreamer,cfoch/gstreamer,ahmedammar/platform_external_gst_gstreamer,jpxiong/gstreamer,shelsonjava/gstreamer,Distrotech/gstreamer