udpsrc: drop dataless UDP packets
udpsrc: drop dataless UDP packets

It is allowed to send/receive UDP packets with no data. When such
a packet is available, select() will return with success but
ioctl(FIONREAD) will return 0. But a read() must still occur in
order to clear off the UDP packet from the queue.

This patch will read the dataless packet from the socket. If
select() was woken for other reasons (and FIONREAD returns 0),
this may result in a UDP packet getting accidentally dropped.
But since UDP is not reliable, this is acceptable.

NOTE: This patch fixes a nasty bug where sending a dataless
      UDP packet to a udpsrc instance will cause an infinite
      loop.

https://bugzilla.gnome.org/show_bug.cgi?id=666644

Signed-off-by: John Ogness <57a85e5e217a72610aef6535ec391bc819cb0f3f@linutronix.de>

ikonst/gst-plugins-good,BigBrother-International/gst-plugins-good,surround-io/gst-plugins-good,davibe/gst-plugins-good-1.0,lovebug356/gst-plugins-good,froggatt/gst-plugins-good-m,lovebug356/gst-plugins-good,Distrotech/gst-plugins-good,freedesktop-unofficial-mirror/gstreamer__gst-plugins-good,greg80303/gst-plugins-good,strukturag/gst-plugins-good,davibe/gst-plugins-good,GrokImageCompression/gst-plugins-good,ndufresne/gst-plugins-good,an146/gst-plugins-good,Lachann/gst-plugins-good,rawoul/gst-plugins-good,Distrotech/gst-plugins-good,loshca/gst-plugins-good,BigBrother-International/gst-plugins-good,ted-n/gst-plugins-good,reynaldo-samsung/gst-plugins-good,hizukiayaka/gst-plugins-good,Distrotech/gst-plugins-good,BigBrother-International/gst-plugins-good,froggatt/gst-plugins-good-m,hizukiayaka/gst-plugins-good,GStreamer/gst-plugins-good,greg80303/gst-plugins-good,Kurento/gst-plugins-good,surround-io/gst-plugins-good,StreamUtils/gst-plugins-good,jpakkane/gstreamer-plugins-good,loshca/gst-plugins-good,vatavuserban/gst-plugins-good,ijsf/OpenWebRTC-gst-plugins-good,vatavuserban/gst-plugins-good,stfl/gst-plugins-good,shelsonjava/gst-plugins-good,loshca/gst-plugins-good,dgerlach/gst-plugins-good,sebras/gst-plugins-good,veo-labs/gst-plugins-good,sh0/gst-plugins-good,reynaldo-samsung/gst-plugins-good,jcaden/gst-plugins-good,BigBrother-International/gst-plugins-good,Distrotech/gst-plugins-good,cablelabs/gst-plugins-good,ndufresne/gst-plugins-good,jcaden/gst-plugins-good,chamois94/gst-plugins-good,rawoul/gst-plugins-good,Kurento/gst-plugins-good,Distrotech/gst-plugins-good,stfl/gst-plugins-good,krad-radio/gstreamer-plugins-good-krad,jpakkane/gstreamer-plugins-good,reynaldo-samsung/gst-plugins-good,froggatt/gst-plugins-good-m,wkatsak/gst-plugins-good,kittee/gst-plugins-good,davibe/gst-plugins-good-1.0,veo-labs/gst-plugins-good,an146/gst-plugins-good,ariscop/gst-plugins-good,loshca/gst-plugins-good,stfl/gst-plugins-good,krad-radio/gstreamer-plugins-good-krad,ariscop/gst-plugins-good,ikonst/gst-plugins-good,knuesel/gst-plugins-good,sh0/gst-plugins-good,veo-labs/gst-plugins-good,krad-radio/gstreamer-plugins-good-krad,collects/gst-plugins-good,Kurento/gst-plugins-good,vatavuserban/gst-plugins-good,rawoul/gst-plugins-good,davibe/gst-plugins-good,Kurento/gst-plugins-good,cfoch/gst-plugins-good,GStreamer/gst-plugins-good,froggatt/gst-plugins-good-m,collects/gst-plugins-good,jcaden/gst-plugins-good,StreamUtils/gst-plugins-good,GStreamer/gst-plugins-good,GrokImageCompression/gst-plugins-good,pexip/gst-plugins-good,reynaldo-samsung/gst-plugins-good,collects/gst-plugins-good,sebras/gst-plugins-good,dgerlach/gst-plugins-good,pexip/gst-plugins-good,ted-n/gst-plugins-good,shelsonjava/gst-plugins-good,collects/gst-plugins-good,strukturag/gst-plugins-good,knuesel/gst-plugins-good,jhodapp/gst-plugins-good,cfoch/gst-plugins-good,pexip/gst-plugins-good,krieger-od/gst-plugins-good,jpakkane/gstreamer-plugins-good,strukturag/gst-plugins-good,cablelabs/gst-plugins-good,knuesel/gst-plugins-good,cfoch/gst-plugins-good,ikonst/gst-plugins-good,jhodapp/gst-plugins-good,cfoch/gst-plugins-good,greg80303/gst-plugins-good,lovebug356/gst-plugins-good,Lachann/gst-plugins-good,rawoul/gst-plugins-good,lovebug356/gst-plugins-good,wkatsak/gst-plugins-good,cablelabs/gst-plugins-good,sh0/gst-plugins-good,surround-io/gst-plugins-good,chamois94/gst-plugins-good,kittee/gst-plugins-good,ijsf/OpenWebRTC-gst-plugins-good,freedesktop-unofficial-mirror/gstreamer__gst-plugins-good,davibe/gst-plugins-good-1.0,pexip/gst-plugins-good,ndufresne/gst-plugins-good,pexip/gst-plugins-good,greg80303/gst-plugins-good,GStreamer/gst-plugins-good,ikonst/gst-plugins-good,surround-io/gst-plugins-good,an146/gst-plugins-good,wkatsak/gst-plugins-good,ariscop/gst-plugins-good,freedesktop-unofficial-mirror/gstreamer__gst-plugins-good,sebras/gst-plugins-good,vatavuserban/gst-plugins-good,StreamUtils/gst-plugins-good,krieger-od/gst-plugins-good,kittee/gst-plugins-good,Kurento/gst-plugins-good,hizukiayaka/gst-plugins-good,jcaden/gst-plugins-good,stfl/gst-plugins-good,an146/gst-plugins-good,strukturag/gst-plugins-good,shelsonjava/gst-plugins-good,chamois94/gst-plugins-good,kittee/gst-plugins-good,jhodapp/gst-plugins-good,ndufresne/gst-plugins-good,cablelabs/gst-plugins-good,ariscop/gst-plugins-good,dgerlach/gst-plugins-good,hizukiayaka/gst-plugins-good,davibe/gst-plugins-good,jhodapp/gst-plugins-good,GrokImageCompression/gst-plugins-good,freedesktop-unofficial-mirror/gstreamer__gst-plugins-good,Lachann/gst-plugins-good,Lachann/gst-plugins-good,sh0/gst-plugins-good,krad-radio/gstreamer-plugins-good-krad,jpakkane/gstreamer-plugins-good,StreamUtils/gst-plugins-good,ted-n/gst-plugins-good,krieger-od/gst-plugins-good,GrokImageCompression/gst-plugins-good,chamois94/gst-plugins-good,ted-n/gst-plugins-good,ijsf/OpenWebRTC-gst-plugins-good,ijsf/OpenWebRTC-gst-plugins-good,wkatsak/gst-plugins-good,davibe/gst-plugins-good-1.0,veo-labs/gst-plugins-good,sebras/gst-plugins-good,knuesel/gst-plugins-good,krieger-od/gst-plugins-good,shelsonjava/gst-plugins-good