avformat/udp: redesign threaded udp tx code