GNOME Bugzilla – Bug 532364
tcpclientsrc broken in 0.10.19
Last modified: 2008-05-13 16:02:28 UTC
Hello, tcpclientsrc is not working anymore in 0.10.19. This can be reproduced with: Shell 1: gst-launch-0.10 -v videotestsrc ! tcpserversink buffers-max=2 buffers-soft-max=1 recover-policy=1 protocol=gdp sync=0 Shell 2: ./gst-launch-0.10 -v tcpclientsrc protocol=gdp ! fakesink sync=0 Stops after: New clock: GstSystemClock Works(drops) fine with 10.17. Reproduced on two systems (kernel 2.6.18 + 2.6.16, I know, quite old:) Maybe it is fixed in cvs already(there have been changes to this file), but I failed to compile it due to dependencies that are not checked within configure. Greetings Hannes B.
Bug Reproduced with my bleeding edge Ubuntu: kernel 2.6.24, Gstreamer 0.10.18
Created attachment 110849 [details] [review] Fixes this bug I solved this bug and maybe other related bugs by adding two lines to gsttcpclientsrc.c: gst_poll_add_fd (src->fdset,&src->sock_fd); gst_poll_fd_ctl_read(src->fdset,&src->sock_fd,TRUE); inside the start method. This configures the GstPoll to return if data can be read. At the moment, gst_poll_wait will never return. To make the code cleaner you should check the return value of these calls.
Thanks for spotting! Patch by: Hannes Bistry <hannesb at gmx dot de> * gst/tcp/gsttcpclientsrc.c: (gst_tcp_client_src_start): * gst/tcp/gsttcpserversink.c: (gst_tcp_server_sink_handle_server_read), (gst_tcp_server_sink_handle_wait), (gst_tcp_server_sink_init_send): Fix regression in clientsrc because we did not add the fd to the poll set anymore. Fixes #532364. Do some cleanups here and there.